From: Alexandre Oliva <oliva@adacore.com>
To: gcc-patches@gcc.gnu.org
Cc: ro@CeBiTec.Uni-Bielefeld.DE, mikestump@comcast.net,
jason@redhat.com, nathan@acm.org
Subject: [PATCH] Skip module_cmi_p and related unsupported module test
Date: Fri, 17 Feb 2023 03:55:54 -0300 [thread overview]
Message-ID: <or5yc0u6f9.fsf@lxoliva.fsfla.org> (raw)
When a multi-source module is found to be unsupported, we fail
module_cmi_p and subsequent sources. Override proc unsupported to
mark the result in module_do, and test it to skip module_cmp_p and
subsequent related tests.
Regstrapped on x86_64-linux-gnu.
Tested on arm-vxworks7 (gcc-12) and arm-eabi (trunk). Ok to install?
for gcc/testsuite/ChangeLog
* g++.dg/modules/modules.exp: Override unsupported to update
module_do, and test it after dg-test.
---
gcc/testsuite/g++.dg/modules/modules.exp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp
index 61994b059457b..ba1287427bf05 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -315,6 +315,14 @@ proc module-check-requirements { tests } {
# cleanup any detritus from previous run
cleanup_module_files [find $DEFAULT_REPO *.gcm]
+set module_do {"compile" "P"}
+rename unsupported saved-unsupported
+proc unsupported { args } {
+ global module_do
+ lset module_do 1 "N"
+ return [saved-unsupported $args]
+}
+
# not grouped tests, sadly tcl doesn't have negated glob
foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \
"$srcdir/$subdir/*_?.\[CH\]"] {
@@ -327,6 +335,9 @@ foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] \
set module_cmis {}
verbose "Testing $nshort $std" 1
dg-test $test "$std" $DEFAULT_MODFLAGS
+ if { [lindex $module_do 1] == "N" } {
+ continue
+ }
set testcase [string range $test [string length "$srcdir/"] end]
cleanup_module_files [module_cmi_p $testcase $module_cmis]
}
@@ -372,6 +383,9 @@ foreach src [lsort [find $srcdir/$subdir {*_a.[CHX}]] {
}
}
dg-test -keep-output $test "$std" $DEFAULT_MODFLAGS
+ if { [lindex $module_do 1] == "N" } {
+ break
+ }
set testcase [string range $test [string length "$srcdir/"] end]
lappend mod_files [module_cmi_p $testcase $module_cmis]
}
--
Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/
Free Software Activist GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts. Ask me about <https://stallmansupport.org>
next reply other threads:[~2023-02-17 6:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 6:55 Alexandre Oliva [this message]
2023-02-20 4:27 ` Jason Merrill
2023-02-22 17:33 ` Alexandre Oliva
2023-02-23 14:18 ` [PATCH] testsuite: Fix up modules.exp [PR108899] Jakub Jelinek
2023-02-23 15:02 ` Richard Biener
2023-03-29 19:59 ` 'g++.dg/modules/modules.exp': don't leak local 'unsupported' proc [PR108899] (was: [PATCH] testsuite: Fix up modules.exp [PR108899]) Thomas Schwinge
2023-03-30 7:00 ` 'g++.dg/modules/modules.exp': don't leak local 'unsupported' proc [PR108899] Alexandre Oliva
2023-03-30 9:39 ` Thomas Schwinge
2023-03-30 13:51 ` Alexandre Oliva
2023-03-31 18:52 ` Jason Merrill
2023-04-01 18:06 ` Mike Stump
2023-04-05 7:47 ` Thomas Schwinge
2023-04-06 2:38 ` Alexandre Oliva
2023-04-06 20:11 ` Thomas Schwinge
2023-04-06 23:40 ` Alexandre Oliva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=or5yc0u6f9.fsf@lxoliva.fsfla.org \
--to=oliva@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=mikestump@comcast.net \
--cc=nathan@acm.org \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).