]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Cleanup after auto-profile testcases when auto-profile is not supported...
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 29 Jul 2025 17:38:58 +0000 (10:38 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 29 Jul 2025 18:00:26 +0000 (11:00 -0700)
The problem here is that in tree-prof.exp does not cleanup if requiring auto-profile
but it is not supported and the testcase uses dg-additional-sources. Currently additional_sources
is not reset to "" and then another testcase comes along and thinks that is the additional source
to be added.

Committed as obvious after testing:
make check-gcc RUNTESTFLAGS="tree-prof.exp=afdo-crossmodule-1.c tree-ssa.exp=pr67891.c"
to make sure pr67891.c now no longer uses the additional source.

PR testsuite/121215
gcc/testsuite/ChangeLog:

* lib/profopt.exp (profopt-execute): Call cleanup-after-saved-dg-test
if returning early for the -fauto-profile case failing case.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/testsuite/lib/profopt.exp

index b4d244b313201a8b4bd21aadef19a452491ab166..81d86c632d17f88f153f5a03f8472de885f0d5ee 100644 (file)
@@ -382,6 +382,7 @@ proc profopt-execute { src } {
            unsupported "$testcase"
            unset testname_with_flags
            verbose "$src not supported on this target, skipping it" 3
+           cleanup-after-saved-dg-test
            return
        }
 
@@ -458,6 +459,7 @@ proc profopt-execute { src } {
                    unsupported "$testcase -fauto-profile: cannot run create_gcov"
                    unset testname_with_flags
                    set status "fail"
+                   cleanup-after-saved-dg-test
                    return
                }
                set status [remote_wait "" 300]