diff mbox series

[1/2] elfutils: Fix backtrace ptests on musl

Message ID 20260928050036.3640902-1-khem.raj@oss.qualcomm.com
State Under Review
Headers show
Series [1/2] elfutils: Fix backtrace ptests on musl | expand

Commit Message

Khem Raj Sept. 28, 2026, 5 a.m. UTC
musl is built with -fno-asynchronous-unwind-tables, so libc.so carries
almost no .eh_frame and its CFI only lives in .debug_frame. Without it the
unwinder cannot get out of abort () and run-backtrace-dwarf.sh fails with
"No DWARF information found". Add musl-dbg to the ptest dependencies, like
glibc-dbg for glibc.

run-backtrace-native-core.sh then unwinds the thread correctly but loops on
musl's __clone, which has no end-of-stack CFI. That is the same reason
run-backtrace-native.sh is already an expected failure on musl, so mark the
core variant as one too.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta/recipes-devtools/elfutils/elfutils_0.196.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/elfutils/elfutils_0.196.bb b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
index 4541000840..167fe44d87 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.196.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.196.bb
@@ -54,6 +54,7 @@  EXTRA_OECONF:append:class-target = " --disable-tests-rpath"
 EXTRA_OECONF:append:class-target:microblaze = " --disable-symbol-versioning"
 
 RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-dbg glibc-dev"
+RDEPENDS:${PN}-ptest:append:libc-musl = " musl-dbg"
 INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps"
 
 do_compile_ptest() {
@@ -65,7 +66,7 @@  PTEST_PARALLEL_MAKE = ""
 PTEST_XFAILS ?= ""
 # See - https://sourceware.org/bugzilla/show_bug.cgi?id=32232
 PTEST_XFAILS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' run-strip-strmerge.sh run-elflint-self.sh run-backtrace-data.sh run-reverse-sections-self.sh', '', d)}"
-PTEST_XFAILS:append:libc-musl = " run-large-elf-file.sh run-backtrace-data.sh run-backtrace-native.sh run-stack-d-test.sh run-stack-i-test.sh run-stack-demangled-test.sh run-deleted.sh run-compress-test.sh"
+PTEST_XFAILS:append:libc-musl = " run-large-elf-file.sh run-backtrace-data.sh run-backtrace-native.sh run-backtrace-native-core.sh run-stack-d-test.sh run-stack-i-test.sh run-stack-demangled-test.sh run-deleted.sh run-compress-test.sh"
 # systemwide stackprof tests need userspace CPU activity, which minimal qemu images lack
 PTEST_XFAILS:append:qemuall = " run-stackprof-system.sh run-stackprof-system-gprof.sh"