On 11 Jun 2024, at 14:24, Etienne Cordonnier via lists.openembedded.org
<[email protected]> wrote:
>
> + # Give some time to [email protected] to process the coredump
> + TIMEOUT_SEC = 20
> + for x in range(TIMEOUT_SEC):
> + status, output = self.target.run('coredumpctl list %s' %
> sleep_pid)
> + if status == 0:
> + break
> + self.assertLess(x, TIMEOUT_SEC - 1, msg="Timed out waiting for
> coredump creation")
> + time.sleep(1)
There’s a more Pythonic structure:
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”)
Cheers,
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200573):
https://lists.openembedded.org/g/openembedded-core/message/200573
Mute This Topic: https://lists.openembedded.org/mt/106613073/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-