From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id CC55C3858D39 for ; Wed, 22 Sep 2021 11:03:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC55C3858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 62lhMw1MtUJ22PkM+g9crSniJjUgIATZWqRUB/+0JN8NY1/GuB4HeFaK+ajWB5xzxJZmbldNVf TBko48ixfauL/cRgzXvwj4DfWeLkOuWoY2UsSzN+TO9XqYADKRecujHAKQ77RGCUzFvy78wqrO eQD0k1dOjvG1P+zl3L5LaUaLWoEHMCQisrpawBJnl4wgtyTHigPWLQV5vSrYq5tnGIyE96+DnX jDT+Bjwf13yMGxkuXe1sigDDAlyo7wbeMoxOCedWuSt6lmWiTVW/c70dvLdAM1Pyw6EbEabpn4 r814gphm+3vkhX3FNOsyHrwR X-IronPort-AV: E=Sophos;i="5.85,313,1624348800"; d="scan'208,223";a="66333112" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 22 Sep 2021 03:03:57 -0800 IronPort-SDR: 3/tUkhd+rwS5UKtHqd7boex/YJIHe/6P8rPIVrCOh+QjuyB7JVknQwS29OdwIYt7DY6ZUmYPsn dMl1ZSYRNRcefvzFs9jkDC+b4huXf8GWKgdb2repLpEdad43hTu3hXiUSigJESosX4ISUVZrUn AKbNwExPLYsb50t35T60oJA8gDd1QllIe1Z5uq0fGpttv+pe5nWsTfZ/gGArRJVv3WLkHbKYo9 MU6UgXw3lmJ+VZZUfmd2U2V19r+VxQqLtnTXptX1MsqpbmDzH0GWIg8rPVGpbQVH+rKta7hB2W HEw= From: Thomas Schwinge To: Jeff Law , Subject: Re: [committed] Make test names unique for a couple of goacc tests In-Reply-To: <507c210a-e2f2-903a-bc01-8415ac7cef99@gmail.com> References: <507c210a-e2f2-903a-bc01-8415ac7cef99@gmail.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/27.1 (x86_64-pc-linux-gnu) Date: Wed, 22 Sep 2021 13:03:46 +0200 Message-ID: <87fstwzxbh.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 11:04:00 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2021-09-19T11:35:00-0600, Jeff Law via Gcc-patches wrote: > A couple of goacc tests do not have unique names. Thanks for fixing this up, and sorry, largely my "fault", I suppose. ;-| > This causes problems > for the test comparison script when one of the test passes and the other > fails -- in this scenario the test comparison script claims there is a > regression. So I understand correctly that this is a problem not just for actual mixed PASS vs. FAIL (which we'd like you to report anyway!) that appear for the same line, but also for mixed PASS vs. XFAIL? (Because, the latter appears to be what you're addressing with your commit here.) > This slipped through for a while because I had turned off x86_64 testing > (others test it regularly and I was revamping the tester's hardware > requirements). Now that I've acquired more x86_64 resources and turned > on native x86 testing again, it's been flagged. (I don't follow that argument -- these test cases should be all generic? Anyway, not important, I guess.) > This patch just adds a numeric suffix to the TODO string to disambiguate > them. So, instead of doing this manually (always error-prone!), like you've... > Committed to the trunk, > commit f75b237254f32d5be32c9d9610983b777abea633 > Author: Jeff Law > Date: Sun Sep 19 13:31:32 2021 -0400 > > [committed] Make test names unique for a couple of goacc tests > --- a/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90 > +++ b/gcc/testsuite/gfortran.dg/goacc/privatization-1-compute.f90 > @@ -39,9 +39,9 @@ contains > !$acc atomic write ! ... to force 'TREE_ADDRESSABLE'. > y =3D a > !$acc end parallel > - ! { dg-note {variable 'i' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compu= te$c_compute } > - ! { dg-note {variable 'j' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compu= te$c_compute } > - ! { dg-note {variable 'a' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO" { xfail *-*-* } l_compu= te$c_compute } > + ! { dg-note {variable 'i' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO2" { xfail *-*-* } l_comp= ute$c_compute } > + ! { dg-note {variable 'j' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO3" { xfail *-*-* } l_comp= ute$c_compute } > + ! { dg-note {variable 'a' in 'private' clause potentially has improp= er OpenACC privatization level: 'parm_decl'} "TODO4" { xfail *-*-* } l_comp= ute$c_compute } ... etc. (also similarly in a handful of earlier commits, if I remember correctly), why don't we do that programmatically, like in the attached "Make sure that we get unique test names if several DejaGnu directives refer to the same line", once and for all? OK to push after proper testing? Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Make-sure-that-we-get-unique-test-names-if-several-D.patch" >From 6e3ae5784888be70056ccc3bb7d379fa8e7f6fc0 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 22 Sep 2021 12:42:41 +0200 Subject: [PATCH] Make sure that we get unique test names if several DejaGnu directives refer to the same line gcc/testsuite/ * lib/gcc-dg.exp (process-message): Make sure that we get unique test names. --- gcc/testsuite/lib/gcc-dg.exp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 7edd070d71d..78a6c3651ef 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -1191,8 +1191,18 @@ proc process-message { msgproc msgprefix dgargs } { upvar dg-messages dg-messages if { [llength $dgargs] == 5 } { - set num [get-absolute-line [lindex $dgargs 0] [lindex $dgargs 4]] - set dgargs [lreplace $dgargs 4 4 $num] + set useline [lindex $dgargs 0] + + # Resolve absolute line number. + set line [get-absolute-line $useline [lindex $dgargs 4]] + set dgargs [lreplace $dgargs 4 4 $line] + + if { $line != $useline } { + # Make sure that we get unique test names if different USELINEs + # refer to the same LINE. + set comment "[lindex $dgargs 2] at line $useline" + set dgargs [lreplace $dgargs 2 2 $comment] + } } # Process the dg- directive, including adding the regular expression -- 2.33.0 --=-=-=--