From patchwork Fri Jan 22 14:47:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 1430381 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=GhofckD1; dkim-atps=neutral Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DMhvS4CSJz9s2g for ; Sat, 23 Jan 2021 01:48:04 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 77F1F398E422; Fri, 22 Jan 2021 14:48:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by sourceware.org (Postfix) with ESMTPS id 8518E398E40B for ; Fri, 22 Jan 2021 14:48:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8518E398E40B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nathanmsidwell@gmail.com Received: by mail-qt1-x82c.google.com with SMTP id l23so1747237qtq.13 for ; Fri, 22 Jan 2021 06:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=Mm9vhE5mpz8lbzPSpY7K9nHSb2kGykIomKRJld8871M=; b=GhofckD1DwA8281axtFhjz1EZxM8MnVFJncmYfsmYo1MRAjnNSNU9Eq6EQeQITO/WR 7ZL/Wc9QZIr2kC8UpZcGYczj289VdOOUsb+5bEQp491nowUQcZXQ/wenL84XT9HrmCec EjBiMzb+sjkCJ1/gozQ3ehvon1/SNLuA6qI3nG/MJn4Y19UrnYH8NBEsVr3K/pssF2xz nadqTeku4ikfIzE6gNWNVbe8xXm+LxTKIaQxbXlfi5LPFYD2reFhKlrna4hLaRoix6rd r1GBXUb/xH4PEK6jh01I/6tU4iSbJXttJXArk7tS5TswnLuwviYrDfc6C2u78cTCKmhS oOdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=Mm9vhE5mpz8lbzPSpY7K9nHSb2kGykIomKRJld8871M=; b=StjmkkmcuFIxAPsiwPcKhq2p8HPsoV3V9lapaMrm3dK9uEYDV2ti0XWSnmar3wAGLQ Kx3y9MzHWdtRKN0jKrm8et+HB7WQM2AiKVip174W8DtUe9bjnzuMRme118OKBQU5uJsw EHiXb4nmcTq0EBDvtL/fREfQCeLBHp9bW7vy0/RTdLzbEtLQeUBBTQj5sXmsYMmj6rXG PrZOAC3JV9JnGL6dZB9gKhUVRoaJ5QVsAPER1QkXaFR4yCJI7vZBj5nxH5tq4km2IBh/ 8AVQqntW1cIE1OQjIiQ4eruYC4d0ugQc5d3WTV9p986kX3238GGodGWqWbbw8RFyLh4m zxTw== X-Gm-Message-State: AOAM530eUHVFuXO54vXSspso+cW5LbDi5AkAxHV7JwybrV2FpPPuPIxf 9p5hKEDip92ZykIzGEm32XU= X-Google-Smtp-Source: ABdhPJwOFlBTDsBoeq4ngHCFjjk9zLFQeVOXXqMdv+gnfZiR0bcrnps6Y7KxyoKR5ZC5sZr9fUuTkw== X-Received: by 2002:ac8:4a97:: with SMTP id l23mr4274597qtq.51.1611326880119; Fri, 22 Jan 2021 06:48:00 -0800 (PST) Received: from ?IPv6:2620:10d:c0a8:1102:944a:9e8:8a1c:30c3? ([2620:10d:c091:480::1:c0d6]) by smtp.googlemail.com with ESMTPSA id n66sm6185925qkn.136.2021.01.22.06.47.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jan 2021 06:47:59 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: testsuite: Uniquify test names [PR 98795] Message-ID: Date: Fri, 22 Jan 2021 09:47:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Header unit names come from the path the preprocessor determines, and thus can be absolute. This tweaks the testsuite to elide that absoluteness when embedded in a CMI name. We were also not distinguishing link and execute tests by the $std flags, so append them when necessary. PR testsuite/98795 gcc/testsuite/ * g++.dg/modules/modules.exp (module_cmi_p): Avoid embedded absolute paths. (module_do_it): Append $std to test name. diff --git c/gcc/testsuite/g++.dg/modules/modules.exp w/gcc/testsuite/g++.dg/modules/modules.exp index bd88bde60dc..8c9a00e68e9 100644 --- c/gcc/testsuite/g++.dg/modules/modules.exp +++ w/gcc/testsuite/g++.dg/modules/modules.exp @@ -118,10 +118,12 @@ proc module_cmi_p { src ifs } { } set not [lindex $if_arg 2] set cmi [lindex $if_arg 3] + global srcdir + set relcmi [string map [list $srcdir "/\$srcdir"] $cmi] if { $not != [file_on_host exists $cmi] } { - pass "$src module-cmi $spec ($cmi)" + pass "$src module-cmi $spec ($relcmi)" } else { - fail "$src module-cmi $spec ($cmi)" + fail "$src module-cmi $spec ($relcmi)" set not [expr ! $not ] } if { ! $not } { @@ -210,8 +212,10 @@ proc module_do_it { do_what testcase std asm_list } { } set options { } + set ident $testcase if { $std != "" } { lappend options "additional_flags=$std" + set ident "$ident $std" } if { [llength $do_what] > 3 } { lappend options "additional_flags=[lindex $do_what 3]" @@ -222,15 +226,15 @@ proc module_do_it { do_what testcase std asm_list } { # link it verbose "Linking $asm_list" 1 if { !$ok } { - unresolved "$testcase link" + unresolved "$identlink" } else { set out [${tool}_target_compile $asm_list \ $execname executable $options] eval $xfail if { $out == "" } { - pass "$testcase link" + pass "$ident link" } else { - fail "$testcase link" + fail "$ident link" set ok 0 } } @@ -238,12 +242,12 @@ proc module_do_it { do_what testcase std asm_list } { # run it? if { !$run } { } elseif { !$ok } { - unresolved "$testcase execute" + unresolved "$ident execute" } else { set out [${tool}_load $execname "" ""] set status [lindex $out 0] eval $xfail - $status "$testcase execute" + $status "$ident execute" if { $status != "pass" } { set $ok 0 }