All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [PATCH] tests/functional: fix log placement when run directly
Date: Tue, 10 Mar 2026 12:03:39 +0000	[thread overview]
Message-ID: <abAImyumsgC6igqQ@redhat.com> (raw)
In-Reply-To: <412d6508-7c30-4580-81e2-cfc69fb279e4@redhat.com>

On Mon, Mar 09, 2026 at 06:46:28PM +0100, Thomas Huth wrote:
> On 09/03/2026 14.36, Daniel P. Berrangé wrote:
> > When running functional tests directly there are some heuristics
> > to figure out where the build directory lives, along with the
> > possibility to override the logic by setting the QEMU_BUILD_DIR
> > env variable. This env var is set as part of the test env when
> > run via Meson but not when run directly.
> > 
> > A particular flaw with the currently logic is that it silently
> > uses the wrong location when the build directory is a sub-dir
> > under "./build", which is a common usage scenario for some devs.
> > 
> > With the recent introduction of the 'run' script, we now have
> > the MESON_BUILD_DIR env variable set unconditionally, so we
> 
> s/MESON_BUILD_DIR/MESON_BUILD_ROOT/
> 
> > can rely on that from the functional tests to get the correct
> > location in all scenarios.
> 
> That's a good idea!
> 
> > Reported-by: Peter Maydell <peter.maydell@linaro.org>
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> >   tests/functional/meson.build         | 2 +-
> >   tests/functional/qemu_test/config.py | 4 ++--
> >   2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/tests/functional/meson.build b/tests/functional/meson.build
> > index b979cff2b9..d34aefa8b0 100644
> > --- a/tests/functional/meson.build
> > +++ b/tests/functional/meson.build
> > @@ -74,7 +74,7 @@ foreach speed : ['quick', 'thorough']
> >         test_deps += [qemu_img]
> >       endif
> >       test_env.set('QEMU_TEST_QEMU_BINARY', test_emulator.full_path())
> > -    test_env.set('QEMU_BUILD_ROOT', meson.project_build_root())
> > +    test_env.set('MESON_BUILD_ROOT', meson.project_build_root())
> 
> I think you could even completely remove this line now completely - if I've
> got that right, meson also sets this environment variable for tests
> automatically.

No, meson does not set MESON_BUILD_ROOT by default - that's something
we have to do ourselves. For the 'run' script we define it in the
'devenv' environment, but for tests we need to define it here.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



      reply	other threads:[~2026-03-10 12:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 13:36 [PATCH] tests/functional: fix log placement when run directly Daniel P. Berrangé
2026-03-09 17:46 ` Thomas Huth
2026-03-10 12:03   ` Daniel P. Berrangé [this message]

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=abAImyumsgC6igqQ@redhat.com \
    --to=berrange@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.