elfdump on FreeBSD requires arguments in order to dump sections for binaries compiled with CTF sections. $ elfdump ./hello_world usage: elfdump -a | -cdeGhinprs [-w file] file $ elfdump -a ./hello_world | grep SUN sh_type: SHT_SUNW(GNU)_versym sh_type: SHT_SUNW(GNU)_verneed sh_name: .SUNW_ctf The testcases assume that no arguments are required, which cause the testcases to fail: $ grep --include \*.ksh ./failure.47/tst.aouttype.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.48/tst.chasestrings.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.49/tst.libtype.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.51/tst.pidprint.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.52/tst.pidprinttarg.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.53/tst.printtype.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.54/tst.printtypetarg.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.55/tst.userlandkey.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.56/tst.userstrings.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' ./failure.66/tst.aouttype.ksh:elfdump "./$exe" | grep -q '.SUNW_ctf' Either elfdump needs to default to -a, or the testcases need to be changed to pass in the appropriate options to dump the section with ".SUNW_ctf" (apparently it seems to be "-c"): $ elfdump -c ./hello_world | grep SUN sh_type: SHT_SUNW(GNU)_versym sh_type: SHT_SUNW(GNU)_verneed sh_name: .SUNW_ctf
Neither option is portable according to the elfdump manpage I just found: http://illumos.org/man/1/elfdump . The easiest way to deal with this is that elfdump should be changed to assume '-a'.
Note that these are userland CTF tests. Support for this feature was merged in r267941, but it's not yet functional; it requires some as yet unimplemented support in libproc. See r267940.
(In reply to Mark Johnston from comment #2) > Note that these are userland CTF tests. Support for this feature was merged > in r267941, but it's not yet functional; it requires some as yet > unimplemented support in libproc. See r267940. Gotcha :) -- I'll add those to the list of "filtered tests" on the branch.
A commit references this bug: Author: markj Date: Tue Sep 16 22:54:18 UTC 2014 New revision: 271693 URL: http://svnweb.freebsd.org/changeset/base/271693 Log: Fix elfdump(1) usage in the userland CTF tests. PR: 193110 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Changes: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/err.user64mode.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.chasestrings.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.libtype.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.pidprint.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.pidprinttarg.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtype.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.printtypetarg.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userlandkey.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.userstrings.ksh
Fixed by using elfdump(1) in a way that should work in illumos as well. This usage is also more correct, since we're specifically looking for a section called .SUNW_ctf.
Close PRs that have had a corresponding fix committed.