public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6306] testsuite: Fix up modules.exp [PR108899]
@ 2023-02-23 16:18 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-02-23 16:18 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:5592679df783547049efc6d73727c5ff809ec302
commit r13-6306-g5592679df783547049efc6d73727c5ff809ec302
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Feb 23 17:17:05 2023 +0100
testsuite: Fix up modules.exp [PR108899]
On Wed, Feb 22, 2023 at 02:33:42PM -0300, Alexandre Oliva via Gcc-patches wrote:
> 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.
>
> for gcc/testsuite/ChangeLog
>
> * g++.dg/modules/modules.exp: Override unsupported to update
> module_do, and test it after dg-test.
This patch breaks testing with more than one set of options in
target board, like
make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp'
yields:
...
=== g++ Summary for unix/-m32 ===
# of expected passes 7217
# of unexpected failures 1
# of expected failures 18
# of unsupported tests 2
Running target unix/-m64
...
ERROR: tcl error sourcing /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp.
ERROR: tcl error code TCL OPERATION RENAME TARGET_EXISTS
ERROR: can't rename to "saved-unsupported": command already exists
while executing
"rename unsupported saved-unsupported"
(file "/home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp" line 322)
invoked from within
"source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /home/jakub/src/gcc/gcc/testsuite/g++.dg/modules/modules.exp"
invoked from within
"catch "uplevel #0 source $test_file_name" msg"
In other spots where we in *.exp files rename some routine, we guard that
and the following patch does that for modules.exp too.
Tested with running
make check-g++ RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} modules.exp'
again which now works properly again.
2023-02-23 Jakub Jelinek <jakub@redhat.com>
PR testsuite/108899
* g++.dg/modules/modules.exp: Only override unsupported if it
exists and saved-unsupported doesn't.
Diff:
---
gcc/testsuite/g++.dg/modules/modules.exp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp
index e66b2082f20..80aa392bc7f 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -319,11 +319,15 @@ 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"}
-rename unsupported saved-unsupported
-proc unsupported { args } {
- global module_do
- lset module_do 1 "N"
- return [saved-unsupported $args]
+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]
+ }
}
# not grouped tests, sadly tcl doesn't have negated glob
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-23 16:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 16:18 [gcc r13-6306] testsuite: Fix up modules.exp [PR108899] Jakub Jelinek
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).