On Mon, 2024-06-10 at 14:39 +0200, Etienne Cordonnier via 
lists.openembedded.org wrote:
> From: Etienne Cordonnier <ecordonn...@snap.com>
> 
> 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.
> ```
> 
> Signed-off-by: Etienne Cordonnier <ecordonn...@snap.com>
> ---
>  meta/lib/oeqa/runtime/cases/systemd.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/meta/lib/oeqa/runtime/cases/systemd.py 
> b/meta/lib/oeqa/runtime/cases/systemd.py
> index 80fdae240a..17fa660ace 100644
> --- a/meta/lib/oeqa/runtime/cases/systemd.py
> +++ b/meta/lib/oeqa/runtime/cases/systemd.py
> @@ -155,6 +155,9 @@ class SystemdServiceTests(SystemdTest):
>          self.target.run('kill -SEGV %s' % output)
>          self.assertEqual(status, 0, msg = 'Not able to find process that 
> runs sleep, output : %s' % output)
>  
> +        # Give some time to systemd-coredump@.service to process the coredump
> +        time.sleep(1)
> +
>          (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 or 
> 'xnanosleep (sleep.coreutils' in output,
> 

Specific sleep values like this are a red flag, it all depends on how
much load systems are under and we've had a lot of problems with these
kinds of things.

Instead, you should probably detect "systemd-coredump@.service unit is
running" in the command output and retry if that is the case with an
overall timeout/error in case it never completes.

Cheers,

Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#200474): 
https://lists.openembedded.org/g/openembedded-core/message/200474
Mute This Topic: https://lists.openembedded.org/mt/106591401/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to