aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-07-31 06:30:59 -0700
committerH.J. Lu <hjl.tools@gmail.com>2025-08-01 04:20:03 -0700
commit393e0434e2313080819e469ee829dfdfa45ea92e (patch)
tree441bc771b23299c0dbac24ef300ffc0bf740cfb1
parent524b8916630bb39a5dfc464ea0ab7e4d88c5b890 (diff)
downloadgdb-393e0434e2313080819e469ee829dfdfa45ea92e.zip
gdb-393e0434e2313080819e469ee829dfdfa45ea92e.tar.gz
gdb-393e0434e2313080819e469ee829dfdfa45ea92e.tar.bz2
gprof: Run tst-gmon-gprof-l.sh after tst-gmon-gprof.sh
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>
-rw-r--r--gprof/testsuite/Makefile.am4
-rw-r--r--gprof/testsuite/Makefile.in4
2 files changed, 6 insertions, 2 deletions
diff --git a/gprof/testsuite/Makefile.am b/gprof/testsuite/Makefile.am
index 0c80b12..7ab1c2e 100644
--- a/gprof/testsuite/Makefile.am
+++ b/gprof/testsuite/Makefile.am
@@ -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
diff --git a/gprof/testsuite/Makefile.in b/gprof/testsuite/Makefile.in
index 2ac5f24..ab8a2cb 100644
--- a/gprof/testsuite/Makefile.in
+++ b/gprof/testsuite/Makefile.in
@@ -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.