From: Kevin Wolf <kwolf@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Eric Blake" <eblake@redhat.com>,
qemu-block@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2] iotests: better heuristics to find I/O tests build/source dirs
Date: Wed, 11 Nov 2026 13:36:48 +0100 [thread overview]
Message-ID: <avRhYD5SR0T5N9_b@redhat.com> (raw)
In-Reply-To: <20261111091133.3527549-1-berrange@redhat.com>
Am 11.11.2026 um 10:11 hat Daniel P. Berrangé geschrieben:
> Currently the I/O tests cannot be run if executing directly
> from the source directory, even when wrapped by the 'run'
> script, due to inadequate heuristics to guess the directories.
>
> If using the 'run' script, meson can tell us exactly where the
> top level build and source directories are, so we don't need
> to guess. Just read MESON_BUILD_ROOT and MESON_SOURCE_ROOT
> env variables if present.
>
> If not using the 'run' script, we can do a bit better at
> guessing the path from the 'check' filename. Always resolve
> from sys.argv[0], even when it is not a symlink, instead of
> falling back to 'cwd()' which doesn't work since we stopped
> having in-tree builds. If invoked directly from the source
> tree, guess that the build root is the default 'build' name
> which often works.
>
> With this change the following all work:
>
> 1. From root of build dir, with run script
>
> cd build
> ./run tests/qemu-iotests/check 5
>
> 2. From root of build dir, without run script
>
> cd build
> tests/qemu-iotests/check 5
>
> 3. From I/O tests subdir of build dir, with run script
>
> cd build/tests/qemu-iotests
> ../../run ./check 5
>
> 4. From I/O tests subdir of build dir, without run script
>
> cd build/tests/qemu-iotests
> ./check 5
>
> 5. From root of source dir, with run script
>
> ./build/run tests/qemu-iotests/check 5
>
> 6. From root of source dir, without run script
>
> tests/qemu-iotests/check 5
>
> 7. From I/O tests subdir of source dir, with run script
>
> cd tests/qemu-iotests
> ../../build/run ./check 5
>
> 8. From I/O tests subdir of source dir, without run script
>
> cd tests/qemu-iotests
> ./check 5
>
> Before this commit, items 5-8 would always fail. Items 6 and
> 8 will not work if using a build directory with a name other
> than the default 'build'. For those scenarios use one of the
> other 6 possible variants.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2026-11-11 12:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 9:11 [PATCH v2] iotests: better heuristics to find I/O tests build/source dirs Daniel P. Berrangé
2026-11-11 12:36 ` Kevin Wolf [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=avRhYD5SR0T5N9_b@redhat.com \
--to=kwolf@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=hreitz@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-block@nongnu.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 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.