diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/systemd.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/systemd.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/systemd.py b/meta/lib/oeqa/runtime/cases/systemd.py index 37f295492d..4c581ba396 100644 --- a/meta/lib/oeqa/runtime/cases/systemd.py +++ b/meta/lib/oeqa/runtime/cases/systemd.py @@ -5,6 +5,7 @@ # import re +import threading import time from oeqa.runtime.case import OERuntimeTestCase @@ -136,6 +137,26 @@ class SystemdServiceTests(SystemdTest): status = self.target.run('mount -oro,remount /')[0] self.assertTrue(status == 0, msg='Remounting / as r/o failed') + @skipIfNotFeature('minidebuginfo', 'Test requires minidebuginfo to be in DISTRO_FEATURES') + @OEHasPackage(['busybox']) + def test_systemd_coredump_minidebuginfo(self): + """ + Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks, + extracted from the minidebuginfo metadata (.gnu_debugdata elf section). + """ + t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && sleep 1000",)) + t_thread.start() + time.sleep(1) + + status, output = self.target.run('pidof sleep') + # cause segfault on purpose + self.target.run('kill -SEGV %s' % output) + self.assertEqual(status, 0, msg = 'Not able to find process that runs sleep, output : %s' % output) + + (status, output) = self.target.run('coredumpctl info') + self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output) + self.assertEqual('sleep_for_duration (busybox.nosuid' in output, True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output) + class SystemdJournalTests(SystemdTest): @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic']) |