From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: ecordonnier@snap.com, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] oeqa/runtime: fix race-condition in minidebuginfo test
Date: Mon, 10 Jun 2024 13:53:18 +0100 [thread overview]
Message-ID: <53a06013f89900cf0942eb6dca0962e5ee924b5c.camel@linuxfoundation.org> (raw)
In-Reply-To: <20240610123935.2102248-1-ecordonnier@snap.com>
On Mon, 2024-06-10 at 14:39 +0200, Etienne Cordonnier via lists.openembedded.org wrote:
> From: Etienne Cordonnier <ecordonnier@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 <ecordonnier@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
next prev parent reply other threads:[~2024-06-10 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 12:39 [PATCH] oeqa/runtime: fix race-condition in minidebuginfo test ecordonnier
2024-06-10 12:53 ` Richard Purdie [this message]
2024-06-10 16:11 ` [OE-core] " Etienne Cordonnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53a06013f89900cf0942eb6dca0962e5ee924b5c.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=ecordonnier@snap.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox