The EnterNamespace= feature currently doesn't work if the debuginfo is
separated from the crashing binary. Until that's resolved, let's run the
test only if the test binary has embedded debuginfo (.debug_info
section; e.g. when systemd is built without WITH_DEBUG=1) or it contains
MiniDebugInfo (.gnu_debugdata section; default on Fedora and CentOS).
See: https://github.com/systemd/systemd/pull/39268#issuecomment-
3390745718
(cherry picked from commit
80b4cacf1b121c8b1ec444970cc566dc4efd1837)
# Test for EnterNamespace= feature
#
# dwfl_set_sysroot() is supported only in libdw-0.192 or newer.
-if pkgconf --atleast-version 0.192 libdw; then
+#
+# FIXME: drop the objdump call once https://github.com/systemd/systemd/pull/39268#issuecomment-3390745718 is
+# addressed
+if pkgconf --atleast-version 0.192 libdw &&
+ objdump -h -j .gnu_debugdata -j .debug_info /usr/lib/systemd/tests/unit-tests/manual/test-coredump-stacktrace; then
MAKE_STACKTRACE_DUMP="/tmp/make-stacktrace-dump"
# Simple script that mounts tmpfs on /tmp/ and copies the crashing test binary there, which in