qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests
Date: Thu, 5 Sep 2024 17:58:23 +0100	[thread overview]
Message-ID: <ZtnjL5fTVJWJ0Owj@redhat.com> (raw)
In-Reply-To: <20240905165554.320577-2-peter.maydell@linaro.org>

On Thu, Sep 05, 2024 at 05:55:53PM +0100, Peter Maydell wrote:
> In the dm163-test and stm32l4x5_usart-test, a couple of subtests are
> missing the qtest_quit() call.  The effect of this is that on hosts
> other than Linux and FreeBSD the test will timeout after executing
> all the tests:
> 
> 242/845 qemu:qtest+qtest-arm / qtest-arm/dm163-test                               TIMEOUT         60.04s   3 subtests passed
> 100/845 qemu:qtest+qtest-arm / qtest-arm/stm32l4x5_usart-test                     TIMEOUT        600.02s   5 subtests passed
> 
> This happens because the qemu-system-arm binary which the test
> starts does not exit, and because it shares the stdout with the
> test binary, the overall meson test harness thinks the test is
> still running. On Linux and FreeBSD we have an extra safety net
> set up in qtest_spawn_qemu() which kills off any QEMU binary that
> ends up without a parent. This is intended for the case where
> QEMU crashed and didn't respond to a SIGTERM or polite request
> to quit, but it also sidestepped the problem in this case.
> However, OpenBSD doesn't have a PDEATHSIG equivalent, so we
> see the timeouts when running a 'make vm-build-openbsd' run.
> 
> Add the missing qtest_quit() calls.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Many thanks to Dan Berrangé for diagnosing the cause of this hang...
> Dan also suggested on IRC that we should support g_autoptr for
> the QTestState, so you don't need to manually qtest_quit(). But
> for the immediate fix, I just add the missing calls.
> ---
>  tests/qtest/dm163-test.c           | 2 ++
>  tests/qtest/stm32l4x5_usart-test.c | 2 ++
>  2 files changed, 4 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-09-05 16:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 16:55 [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell
2024-09-05 16:55 ` [PATCH 1/2] tests/qtest: Add missing qtest_quit() to stm32 tests Peter Maydell
2024-09-05 16:58   ` Daniel P. Berrangé [this message]
2024-09-05 16:55 ` [PATCH 2/2] tests/qtest: Bump timeout on ahci-test Peter Maydell
2024-09-05 16:58   ` Daniel P. Berrangé
2024-09-06 14:28 ` [PATCH 0/2] tests/qtest: Fix problems running with make vm-build-openbsd Peter Maydell

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=ZtnjL5fTVJWJ0Owj@redhat.com \
    --to=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).