public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] [PR108899] testsuite: fix proc unsupported overriding in modules.exp Date: Thu, 30 Mar 2023 14:08:22 +0000 (GMT) [thread overview] Message-ID: <20230330140822.6189E3858C78@sourceware.org> (raw) https://gcc.gnu.org/g:fd36f78762c1b3d0a751fff121792f0bfaca775d commit fd36f78762c1b3d0a751fff121792f0bfaca775d Author: Alexandre Oliva <oliva@adacore.com> Date: Thu Mar 30 05:07:30 2023 -0300 [PR108899] testsuite: fix proc unsupported overriding in modules.exp The overrider of proc unsupported in modules.exp had two problems reported by Thomas Schwinge, even after Jakub Jelínek's fix: - it remained in effect while running other dejagnu testsets - it didn't quote correctly the argument list passed to it, which caused test names to be surrounded by curly braces, as in: UNSUPPORTED: {...} This patch fixes both issues, obsoleting and reverting Jakub's change, by dropping the overrider and renaming the saved proc back, and by using uplevel's argument list splicing. for gcc/testsuite/ChangeLog PR testsuite/108899 * g++.dg/modules/modules.exp (unsupported): Drop renaming. Fix quoting. Diff: --- gcc/testsuite/g++.dg/modules/modules.exp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp index 80aa392bc7f..dc302d3d0af 100644 --- a/gcc/testsuite/g++.dg/modules/modules.exp +++ b/gcc/testsuite/g++.dg/modules/modules.exp @@ -319,15 +319,11 @@ cleanup_module_files [find $DEFAULT_REPO *.gcm] # so that, after an unsupported result in dg-test, we can skip rather # than fail subsequent related tests. set module_do {"compile" "P"} -if { [info procs unsupported] != [list] \ - && [info procs saved-unsupported] == [list] } { - rename unsupported saved-unsupported - - proc unsupported { args } { - global module_do - lset module_do 1 "N" - return [saved-unsupported $args] - } +rename unsupported modules-saved-unsupported +proc unsupported { args } { + global module_do + lset module_do 1 "N" + return [uplevel 1 modules-saved-unsupported $args] } # not grouped tests, sadly tcl doesn't have negated glob @@ -412,4 +408,10 @@ foreach src [lsort [find $srcdir/$subdir {*_a.[CHX}]] { } } +# Restore the original unsupported proc, lest it will affect +# subsequent test runs, or even fail renaming if we run modules.exp +# for multiple targets/multilibs/options. +rename unsupported {} +rename modules-saved-unsupported unsupported + dg-finish
reply other threads:[~2023-03-30 14:08 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230330140822.6189E3858C78@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).