[gcc r17-2370] testsuite: Fix unstable duplicate test names in pr111527.exp [PR111527]

Jeff Law via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:f92e603f22924348b005d2acdebfda8a2c159773

commit r17-2370-gf92e603f22924348b005d2acdebfda8a2c159773
Author: Sunil Dora <[email protected]>
Date:   Mon Jul 13 15:19:48 2026 -0600

    testsuite: Fix unstable duplicate test names in pr111527.exp [PR111527]
    
    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 <[email protected]>

Diff:
---
 gcc/testsuite/gcc.misc-tests/pr111527.exp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gcc/testsuite/gcc.misc-tests/pr111527.exp b/gcc/testsuite/gcc.misc-tests/pr111527.exp
index 0e71519483f3..586bdb43ebfc 100644
--- a/gcc/testsuite/gcc.misc-tests/pr111527.exp
+++ b/gcc/testsuite/gcc.misc-tests/pr111527.exp
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.