From: Adrian Freihofer <[email protected]>

coredumpctl renders the full binary path in stack frames
(e.g. /usr/bin/busybox.nosuid) instead of just the basename
(busybox.nosuid). Use assertRegex with an optional path prefix so
the assertion validates both the function name and the correct
binary regardless of how coredumpctl formats the executable path.

  File ".../openembedded-core/meta/lib/oeqa/runtime/cases/systemd.py", line 
169, in test_systemd_coredump_minidebuginfo
    self.assertEqual('sleep_for_duration (busybox.nosuid' in output or 
'xnanosleep (sleep.coreutils' in output,
    
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     True, msg='Call stack is missing minidebuginfo symbols 
(functions shown as "n/a"): %s' % output)
                     
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: False != True : Call stack is missing minidebuginfo symbols 
(functions shown as "n/a"):            PID: 9661 (sleep)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Tue 2026-08-04 22:41:41 UTC (1s ago)
  Command Line: sleep 1000
    Executable: /usr/bin/busybox.nosuid
 Control Group: 
/system.slice/system-dropbear.slice/[email protected]:22-10.0.2.2:50980.service
          Unit: [email protected]:22-10.0.2.2:50980.service
         Slice: system-dropbear.slice
       Boot ID: 986c0a0096f3438cb90fe64ff32e9e15
    Machine ID: 84f8b285af8c46288f07ddb18356b617
      Hostname: ConnectX500-140006B0DB
       Storage: 
/var/lib/systemd/coredump/core.sleep.0.986c0a0096f3438cb90fe64ff32e9e15.9661.1785883301000000.zst
 (present)
  Size on Disk: 24.9K
       Message: Process 9661 (sleep) of user 0 dumped core.

                Stack trace of thread 9661:
                #0  0x0000ffffbbd357a0 __internal_syscall_cancel (libc.so.6 + 
0x857a0)
                #1  0x0000ffffbbd7101c clock_nanosleep (libc.so.6 + 0xc101c)
                #2  0x0000ffffbbd7b5a0 __nanosleep (libc.so.6 + 0xcb5a0)
----->          #3  0x0000aaaad9125fc8 sleep_for_duration 
(/usr/bin/busybox.nosuid + 0xa5fc8)
                #4  0x0000aaaad9125fc8 sleep_for_duration 
(/usr/bin/busybox.nosuid + 0xa5fc8)
                #5  0x0000ffffbbcd305c __libc_start_main (libc.so.6 + 0x2305c)
                ELF object binary architecture: AARCH64

Signed-off-by: Adrian Freihofer <[email protected]>
---
 meta/lib/oeqa/runtime/cases/systemd.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/systemd.py 
b/meta/lib/oeqa/runtime/cases/systemd.py
index 640f28abe9..23dd3a3009 100644
--- a/meta/lib/oeqa/runtime/cases/systemd.py
+++ b/meta/lib/oeqa/runtime/cases/systemd.py
@@ -166,8 +166,10 @@ class SystemdServiceTests(SystemdTest):
 
         (status, output) = self.target.run('coredumpctl info %s' % sleep_pid)
         self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % 
output)
-        self.assertEqual('sleep_for_duration (busybox.nosuid' in output or 
'xnanosleep (sleep.coreutils' in output,
-                         True, msg='Call stack is missing minidebuginfo 
symbols (functions shown as "n/a"): %s' % output)
+        self.assertRegex(output,
+                         r'sleep_for_duration \((?:.*/)?busybox\.nosuid'
+                         r'|xnanosleep \((?:.*/)?sleep\.coreutils',
+                         msg='Call stack is missing minidebuginfo symbols 
(functions shown as "n/a"): %s' % output)
 
 class SystemdJournalTests(SystemdTest):
 
-- 
2.55.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#245779): 
https://lists.openembedded.org/g/openembedded-core/message/245779
Mute This Topic: https://lists.openembedded.org/mt/121241413/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to