qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, "Laurent Vivier" <lvivier@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	qemu-arm@nongnu.org, "Stefan Hajnoczi" <stefanha@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>
Subject: Re: [PATCH 1/4] microbit: add missing qtest_quit() call
Date: Wed, 13 Sep 2023 09:06:17 +0100	[thread overview]
Message-ID: <ZQFteR+kBmMzK7v2@redhat.com> (raw)
In-Reply-To: <61724857-2edd-e19b-aa37-23658cd4119b@linaro.org>

On Tue, Sep 12, 2023 at 12:10:19PM -0700, Richard Henderson wrote:
> On 9/12/23 11:41, Daniel P. Berrangé wrote:
> > Without this call, the QEMU process is being left running which on
> > FreeBSD 13.2 at least, makes meson think the test is still running,
> > and thus execution of "make check" continues forever.
> > 
> > This fixes the regression introduced in:
> > 
> >    commit a9c9bbee855877293683012942d3485d50f286af
> >    Author: Chris Laplante<chris@laplante.io>
> >    Date:   Tue Aug 22 17:31:02 2023 +0100
> > 
> >      qtest: microbit-test: add tests for nRF51 DETECT
> > 
> > Fixes:https://gitlab.com/qemu-project/qemu/-/issues/1882
> > Signed-off-by: Daniel P. Berrangé<berrange@redhat.com>
> > ---
> >   tests/qtest/microbit-test.c | 2 ++
> >   1 file changed, 2 insertions(+)
> 
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> 
> But I think that it's unfortunate that we have to remember this for each test.

We should use G_DEFINE_AUTOPTR_CLEANUP_FUNC for QTestState, and
then we can change tests to declare

   g_autoptr(QTestState) qts = qtest_init(....)

which will make it a bit more robust against forgotten cleanup.



We register an ABRT handler to kill off QEMU manually during
g_asserts().

The "death signal" code will give another layer of robustness
for exits too on Linux and now FreeBSD.

If we really wanted to we could add a 3rd layer of defence by
adding an atexit() handler, but I'm not sure this last one is
worth it for something we're not hitting frequently AFAIR.

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:[~2023-09-13  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 18:41 [PATCH 0/4] ci: fix hang of FreeBSD CI jobs Daniel P. Berrangé
2023-09-12 18:41 ` [PATCH 1/4] microbit: add missing qtest_quit() call Daniel P. Berrangé
2023-09-12 19:10   ` Richard Henderson
2023-09-13  8:06     ` Daniel P. Berrangé [this message]
2023-09-12 18:41 ` [PATCH 2/4] qtest: kill orphaned qtest QEMU processes on FreeBSD Daniel P. Berrangé
2023-09-12 19:05   ` Richard Henderson
2023-09-12 18:41 ` [PATCH 3/4] gitlab: make Cirrus CI timeout explicit Daniel P. Berrangé
2023-09-13  5:54   ` Philippe Mathieu-Daudé
2023-09-12 18:41 ` [PATCH 4/4] gitlab: make Cirrus CI jobs gating Daniel P. Berrangé
2023-09-12 19:00 ` [PATCH 0/4] ci: fix hang of FreeBSD CI jobs Stefan Hajnoczi
2023-09-12 20:03 ` Thomas Huth
2023-09-13  8:48   ` Alex Bennée
2023-09-13  9:00     ` Daniel P. Berrangé
2023-09-13  9:02     ` Thomas Huth
2023-09-13  9:53       ` Philippe Mathieu-Daudé

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=ZQFteR+kBmMzK7v2@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=bleal@redhat.com \
    --cc=joel@jms.id.au \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@gmail.com \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /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).