diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-07-20 11:48:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 11:48:28 +0000 |
commit | 3f5fc214f4a53ac6c90e421814fcf049e56d3dc9 (patch) | |
tree | 3c80fd4a96e95a3069124d6e9ec9b97a6d190a6f /gcc | |
parent | 137cd3bbaa05038b01c46f7ac7472da7ca662ed7 (diff) | |
parent | 51f03d9d697b0f3fed65f85e88ce41d424c844fb (diff) | |
download | gcc-3f5fc214f4a53ac6c90e421814fcf049e56d3dc9.zip gcc-3f5fc214f4a53ac6c90e421814fcf049e56d3dc9.tar.gz gcc-3f5fc214f4a53ac6c90e421814fcf049e56d3dc9.tar.bz2 |
Merge #1404
1404: 'gcc/testsuite/rust/link/link.exp': Fix 'runtest_file_p' usage r=philberty a=tschwinge
The recent commit 418aef1b006182e84266dcf4f31ee721ed04301a
"Support extern crate" (merged in
commit fd2bd659e44e5b7fea92bc34a4864f057f387490 "Merge #1362"), added
'gcc/testsuite/rust/link/link.exp', which I understand to be a hacked up
variant of the LTO multi-file testing harness (not reviewed in detail).
Since that commit, there are issues in parallel testing, so that, for example
with:
$ make -j12 check-rust RUNTESTFLAGS='--target_board=unix\{,-m32,-mx32\}'
..., the first variant does test as expected:
`@@` -6490,9 +6490,31 `@@` PASS: rust/execute/torture/trait9.rs -Os at line 13 (test for warnings, line
PASS: rust/execute/torture/trait9.rs -Os (test for excess errors)
PASS: rust/execute/torture/trait9.rs -Os execution test
PASS: rust/execute/torture/trait9.rs -Os output pattern test
+Running /home/thomas/tmp/source/gcc/rust/build/trace-slim/source-gcc/gcc/testsuite/rust/link/link.exp ...
+PASS: rust/link/generic_function_0.rs -O0 (test for excess errors)
+[...]
+PASS: rust/link/trait_import_0.rs -Os (test for excess errors)
=== rust Summary for unix ===
-# of expected passes 6445
+# of expected passes 6466
# of expected failures 31
..., but we then get undesired changes for the second and following variants:
Running target unix/-m32
Running /home/thomas/tmp/source/gcc/rust/build/trace-slim/source-gcc/gcc/testsuite/rust/compile/compile.exp ...
PASS: rust/compile/abi-options1.rs at line 2 (test for errors, line 1)
PASS: rust/compile/abi-options1.rs at line 7 (test for errors, line 6)
PASS: rust/compile/abi-options1.rs (test for excess errors)
-PASS: rust/compile/array3.rs at line 2 (test for warnings, line 1)
-PASS: rust/compile/array3.rs (test for excess errors)
-PASS: rust/compile/array_empty_list.rs at line 3 (test for errors, line 2)
-PASS: rust/compile/array_empty_list.rs (test for excess errors)
-PASS: rust/compile/arrays1.rs (test for errors, line 3)
-PASS: rust/compile/arrays1.rs (test for excess errors)
PASS: rust/compile/arrays2.rs at line 4 (test for errors, line 3)
PASS: rust/compile/arrays2.rs (test for excess errors)
PASS: rust/compile/attr-mismatch-crate-name.rs (test for excess errors)
`@@` -8355,110 +8371,215 `@@` PASS: rust/compile/torture/generics17.rs -O3 -g (test for excess errors)
PASS: rust/compile/torture/generics17.rs -Os at line 18 (test for warnings, line 17)
PASS: rust/compile/torture/generics17.rs -Os (test for excess errors)
PASS: rust/compile/torture/generics18.rs -O0 at line 19 (test for warnings, line 18)
+PASS: rust/compile/torture/generics18.rs -O0 at line 19 (test for warnings, line 18)
+PASS: rust/compile/torture/generics18.rs -O0 at line 5 (test for warnings, line 4)
PASS: rust/compile/torture/generics18.rs -O0 at line 5 (test for warnings, line 4)
PASS: rust/compile/torture/generics18.rs -O0 (test for excess errors)
+PASS: rust/compile/torture/generics18.rs -O0 (test for excess errors)
..., and so on.
This has been determined to be due to repetitive 'runtest_file_p' calls (it's
a mess...), thusly fixed (some would call it a "hack", no doubt), and verified
that, for example:
$ make -j12 check-rust RUNTESTFLAGS='--target_board=unix\{,-m32,-mx32\} link.exp=simple_function_0.rs'
... only runs the one test as indicated.
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/rust/link/link.exp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/link/link.exp b/gcc/testsuite/rust/link/link.exp index b504e4c..8b2e93c 100644 --- a/gcc/testsuite/rust/link/link.exp +++ b/gcc/testsuite/rust/link/link.exp @@ -154,7 +154,16 @@ foreach src [lsort [find $srcdir/$subdir *_0.rs]] { continue } + # To prevent 'runtest_file_p' being tested again (for example, via + # 'gcc-dg-runtest'), with undesirable consequences due to its side effects, + # interpose a dummy: + rename runtest_file_p saved_runtest_file_p + proc runtest_file_p { runtests testcase } { + return 1 + } rs-link-execute $src + rename runtest_file_p {} + rename saved_runtest_file_p runtest_file_p } set dg-do-what-default ${saved-dg-do-what-default} |