On 11/12/2026 5:30 AM, Daniel P. Berrangé wrote: > 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é <[email protected]> > --- > meson.build | 1 + > tests/qemu-iotests/check | 52 +++++++++++++++++++++++++++++----------- > 2 files changed, 39 insertions(+), 14 deletions(-) >
I'm not sure if this patch is a required change for current series, as it seems to be unrelated. Regards, Pierrick
