]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix unstable duplicate test names in pr111527.exp [PR111527]
authorSunil Dora <sunilkumar.dora@windriver.com>
Mon, 13 Jul 2026 21:19:48 +0000 (15:19 -0600)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Mon, 13 Jul 2026 21:19:48 +0000 (15:19 -0600)
pr111527.exp does not call runtest_file_p, so with parallel make
check more than one runtest instance can run it and the number of
duplicate test names varies from run to run.  Take the
gcc_parallel_test_run_p lock like linkage.exp does so the tests
run only once.

gcc/testsuite/ChangeLog:

PR driver/111527
* gcc.misc-tests/pr111527.exp: Serialize with
gcc_parallel_test_run_p to avoid duplicate test names.

Signed-off-by: Sunil Dora <sunilkumar.dora@windriver.com>
gcc/testsuite/gcc.misc-tests/pr111527.exp

index 0e71519483f38c9f9f03dc6809338dd328127cad..586bdb43ebfc07b470bc2dc76f517740dc0f974c 100644 (file)
@@ -24,6 +24,14 @@ if { [is_remote host] } {
     return
 }
 
+# This file doesn't use runtest_file_p, so disable parallelization
+# of this *.exp file.  The first parallel runtest to reach this
+# will run the tests.
+if { ![gcc_parallel_test_run_p pr111527] } {
+    return
+}
+gcc_parallel_test_enable 0
+
 global GCC_UNDER_TEST
 if { ![info exists GCC_UNDER_TEST] } {
     set GCC_UNDER_TEST [find_gcc]
@@ -76,3 +84,5 @@ if { [regexp {COLLECT_GCC_OPTIONS=@[^[:space:]]+} $out] } {
 file delete -force $obj
 file delete -force $rsp
 file delete -force $src
+
+gcc_parallel_test_enable 1