]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gprof: Run tst-gmon-gprof-l.sh after tst-gmon-gprof.sh
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 31 Jul 2025 13:30:59 +0000 (06:30 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Aug 2025 11:20:03 +0000 (04:20 -0700)
Both tst-gmon-gprof.sh and tst-gmon-gprof-l.sh generate gmon.out and
process it.  Run tst-gmon-gprof-l.sh after tst-gmon-gprof.sh to avoid
the race condition.

* testsuite/Makefile.am (tst-gmon-gprof-l.out): Depend on
tst-gmon-gprof.out.
* testsuite/Makefile.in: Regenerated.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
gprof/testsuite/Makefile.am
gprof/testsuite/Makefile.in

index 0c80b12e6e4628754570a528948657027117645b..7ab1c2ea6b7e9f9b628d68b30835def966002a09 100644 (file)
@@ -37,7 +37,9 @@ tst-gmon-gprof.out: tst-gmon$(EXEEXT) $(GPROF)
 
 check_SCRIPTS += tst-gmon-gprof-l.sh
 check_DATA += tst-gmon-gprof-l.out
-tst-gmon-gprof-l.out: tst-gmon$(EXEEXT) $(GPROF)
+# Run tst-gmon-gprof-l.sh after tst-gmon-gprof.sh to avoid the race
+# condition since they both generate gmon.out.
+tst-gmon-gprof-l.out: tst-gmon$(EXEEXT) $(GPROF) tst-gmon-gprof.out
        $(srcdir)/tst-gmon-gprof-l.sh $(GPROF) tst-gmon$(EXEEXT)
 
 endif NATIVE
index 2ac5f241012715be820d1645c420d0549ae18c9c..ab8a2cbb16e29d8d79a994193ab07ac07377ced1 100644 (file)
@@ -884,7 +884,9 @@ uninstall-am:
 @NATIVE_TRUE@  $(LINK) tst-gmon.$(OBJEXT)
 @NATIVE_TRUE@tst-gmon-gprof.out: tst-gmon$(EXEEXT) $(GPROF)
 @NATIVE_TRUE@  $(srcdir)/tst-gmon-gprof.sh $(GPROF) tst-gmon$(EXEEXT)
-@NATIVE_TRUE@tst-gmon-gprof-l.out: tst-gmon$(EXEEXT) $(GPROF)
+# Run tst-gmon-gprof-l.sh after tst-gmon-gprof.sh to avoid the race
+# condition since they both generate gmon.out.
+@NATIVE_TRUE@tst-gmon-gprof-l.out: tst-gmon$(EXEEXT) $(GPROF) tst-gmon-gprof.out
 @NATIVE_TRUE@  $(srcdir)/tst-gmon-gprof-l.sh $(GPROF) tst-gmon$(EXEEXT)
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.