binutils-gdb/gprof/testsuite
Rainer Orth c52a3e8683 gprof: Fix tests on Solaris [PR34237]
The gprof tests FAIL on Solaris:

tst-gmon-gprof.sh ../gprof tst-gmon
--- expected
+++ actual
@@ -1,3 +1,4 @@
 f1 2000
 f2 1000
 f3 1
+main 1
FAIL

main is included in the call graph, probably because Solaris still uses
the original BSD gmon.out format.

This patch allows for that difference.  To distinguish between targets
with non-default handling, $target is passed to the test scripts.

As detailed in the PR, the powerpc with function descriptors special
case only applies to AIX, so that variant is guarded accordingly.

Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and
x86_64-pc-linux-gnu.

2026-06-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gprof:
	PR gprof/34237
	* testsuite/Makefile.am (tst-gmon-gprof.out): Pass $(target) to
	tst-gmon-gprof.sh.
	(tst-gmon-gprof-l.out): Likewise.
	(tst-gmon-gprof-l2.out): Likewise.
	* testsuite/Makefile.in: Regenerate.

	* testsuite/tst-gmon-gprof.sh (expected_dot): Remove.
	<*-*-solaris2*>: Allow main in execution counters.
	<powerpc-*-aix* | rs6000-*-aix*>: Handle function descriptor case here.
	* testsuite/tst-gmon-gprof-l.sh: Likewise.
	* testsuite/tst-gmon-gprof-l2.sh: Likewise.
2026-06-11 10:05:03 +02:00
..
Makefile.am gprof: Fix tests on Solaris [PR34237] 2026-06-11 10:05:03 +02:00
Makefile.in gprof: Fix tests on Solaris [PR34237] 2026-06-11 10:05:03 +02:00
tst-gmon-gprof-l.sh gprof: Fix tests on Solaris [PR34237] 2026-06-11 10:05:03 +02:00
tst-gmon-gprof-l2.sh gprof: Fix tests on Solaris [PR34237] 2026-06-11 10:05:03 +02:00
tst-gmon-gprof.sh gprof: Fix tests on Solaris [PR34237] 2026-06-11 10:05:03 +02:00
tst-gmon.c gprof: fix testsuite with older glibc 2026-02-13 10:19:39 +01:00