mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 00:32:13 +02:00
oeqa/runtime: fix race-condition in minidebuginfo test
Fix this error where 'coredumpctl info' warns that the coredump is still being processed: ``` AssertionError: 1 != 0 : MiniDebugInfo Test failed: No match found. -- Notice: 1 systemd-coredump@.service unit is running, output may be incomplete. ``` (From OE-Core rev: ad1ce64f5c1f22a7b10025d8cba20dc74354ac81) (From OE-Core rev: f7e824477ef75fcea8e0b777278413304def631c) Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit ed562345d5a5f2edb649028553199f3f7966e19e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
b285f6d0fe
commit
e8b3c87ca6
@@ -150,12 +150,21 @@ class SystemdServiceTests(SystemdTest):
|
||||
t_thread.start()
|
||||
time.sleep(1)
|
||||
|
||||
status, output = self.target.run('pidof sleep')
|
||||
status, sleep_pid = 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)
|
||||
self.target.run('kill -SEGV %s' % sleep_pid)
|
||||
self.assertEqual(status, 0, msg = 'Not able to find process that runs sleep, output : %s' % sleep_pid)
|
||||
|
||||
(status, output) = self.target.run('coredumpctl info')
|
||||
# Give some time to systemd-coredump@.service to process the coredump
|
||||
for x in range(20):
|
||||
status, output = self.target.run('coredumpctl list %s' % sleep_pid)
|
||||
if status == 0:
|
||||
break
|
||||
time.sleep(1)
|
||||
else:
|
||||
self.fail("Timed out waiting for coredump creation")
|
||||
|
||||
(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)
|
||||
|
||||
Reference in New Issue
Block a user