Question about recent iotest changes, 'make check' and 'ninja test'
Hi,
I happen to use 'ninja -C build test to do a (usually) quick sanity test on patches and changes and whatnot. An usual run of this target tests around 327 individual tests with the RISC-V stuff I usually build.
After pulling today's master 'ninja -C build test' is now running a whooping 1366 tests. Here's an example:
$ ninja -C build -j 9 test ninja: Entering directory `build' mkvenv: checking for pygdbmi>=0.11.0.0 mkvenv: installing pygdbmi==0.11.0.0 [2/3] Running all tests [1-12/1366] (....) (....) [250-260/1366] 🌕 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [250-261/1366] 🌖 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [252-262/1366] 🌒 block-qcow2-optional+block-slow - qemu:io-qcow2-026 (...)
I noticed a lot of these "optional+block-slow" tests being ran now, something that wasn't happening before.
If I use 'make check' I have the results I was having with 'ninja -C build test' before the recent changes.
I tried to bisect and got to this commit:
commit daf0d008822be3cb14cdb533f7237c3c789bc373 (HEAD)
Author: Daniel P. Berrangé <[email protected]> Date: Mon Jan 12 13:01:49 2026 +0000
iotests: remove redundant meson suite for iotests
From what I can tell this commit triggered (unintended?) stuff that was already in the code. In other words I am not sure if this commit is actually the culprit, so I am reluctant to even call this a bug.
My question is: should I be using 'ninja test'? It seems to me that the common practice is to use 'make check' and maybe I've been using an "unsupported" testing scheme.
Cheers,
Daniel
Quoted 28 lines · Daniel Henrique Barboza
Hi,
I happen to use 'ninja -C build test to do a (usually) quick sanity test on patches and changes and whatnot. An usual run of this target tests around 327 individual tests with the RISC-V stuff I usually build.
After pulling today's master 'ninja -C build test' is now running a whooping 1366 tests. Here's an example:
$ ninja -C build -j 9 test ninja: Entering directory `build' mkvenv: checking for pygdbmi>=0.11.0.0 mkvenv: installing pygdbmi==0.11.0.0 [2/3] Running all tests [1-12/1366] (....) (....) [250-260/1366] 🌕 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [250-261/1366] 🌖 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [252-262/1366] 🌒 block-qcow2-optional+block-slow - qemu:io-qcow2-026 (...)I noticed a lot of these "optional+block-slow" tests being ran now, something that wasn't happening before.
If I use 'make check' I have the results I was having with 'ninja -C build test' before the recent changes.
Quoted 7 lines
I tried to bisect and got to this commit:
commit
daf0d008822be3cb14cdb533f7237c3c789bc373(HEAD)
Author: Daniel P. Berrangé <[email protected]> Date: Mon Jan 12 13:01:49 2026 +0000iotests: remove redundant meson suite for iotests
Cc'ing developers involved in this commit and Alex.
Quoted 8 lines
From what I can tell this commit triggered (unintended?) stuff that was
already in the
code. In other words I am not sure if this commit is actually the culprit, so I am reluctant to even call this a bug.My question is: should I be using 'ninja test'? It seems to me that the common practice is to use 'make check' and maybe I've been using an "unsupported" testing scheme.
This is what was explained to me on #irc when I complained about a similar issue, however I still use ninja first because it is much faster than having make parsing Makefiles not triggering any rule before calling ninja. When this (rarely) fails I go back to 'make'.
Some developers like Pierrick better understand ninja and use it directly.
Quoted 7 lines
Cheers,
Daniel
Quoted 37 lines · Daniel Henrique Barboza
Hi,
I happen to use 'ninja -C build test to do a (usually) quick sanity test on patches and changes and whatnot. An usual run of this target tests around 327 individual tests with the RISC-V stuff I usually build.
After pulling today's master 'ninja -C build test' is now running a whooping
1366 tests. Here's an example:$ ninja -C build -j 9 test ninja: Entering directory `build' mkvenv: checking for pygdbmi>=0.11.0.0 mkvenv: installing pygdbmi==0.11.0.0 [2/3] Running all tests [1-12/1366] (....) (....) [250-260/1366] 🌕 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [250-261/1366] 🌖 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [252-262/1366] 🌒 block-qcow2-optional+block-slow - qemu:io-qcow2-026 (...)I noticed a lot of these "optional+block-slow" tests being ran now, something that
wasn't happening before.If I use 'make check' I have the results I was having with 'ninja -C build test'
before the recent changes.I tried to bisect and got to this commit:
commit
daf0d008822be3cb14cdb533f7237c3c789bc373(HEAD)
Author: Daniel P. Berrangé <[email protected]> Date: Mon Jan 12 13:01:49 2026 +0000
Quoted 9 lines
iotests: remove redundant meson suite for iotests
From what I can tell this commit triggered (unintended?) stuff that was already in the
code. In other words I am not sure if this commit is actually the culprit, so I am
reluctant to even call this a bug.
Recently Daniel sent a series to enable more iotests, which is great!
https://lore.kernel.org/qemu-devel/[email protected]/
It seems like a side effect is that they are default now when using ninja -C test. They should be correctly filtered if you use make check-*.
Quoted 5 lines
My question is: should I be using 'ninja test'? It seems to me that the common practice
is to use 'make check' and maybe I've been using an "unsupported" testing scheme.
Officially, it's not how we're supposed to run things. I asked the same question a few months ago and was invited to not rely on meson testing, and thus ninja test by extension. That's sad IMHO, meson interface is much better than make interface.
Looking at build/build.ninja, (grep "build test:"), test target does:
./build/pyvenv/bin/meson test --no-rebuild --no-stdsplit --print-errorlogs
I prefer to use meson test, since you can easily list and run specific tests.
./build/pyvenv/bin/meson test --print-errorlogs \
--setup thorough --list
I personally always run (well, I don't, GitHub does for me) tests with thorough setup, so all tests are ran anyway.
Quoted 6 lines
Cheers,
Daniel
Regards,
Pierrick
Quoted 37 lines · Daniel Henrique Barboza
Hi,
I happen to use 'ninja -C build test to do a (usually) quick sanity test on patches and changes and whatnot. An usual run of this target tests around 327 individual tests with the RISC-V stuff I usually build.
After pulling today's master 'ninja -C build test' is now running a whooping 1366 tests. Here's an example:
$ ninja -C build -j 9 test ninja: Entering directory `build' mkvenv: checking for pygdbmi>=0.11.0.0 mkvenv: installing pygdbmi==0.11.0.0 [2/3] Running all tests [1-12/1366] (....) (....) [250-260/1366] 🌕 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [250-261/1366] 🌖 block-qcow2-optional+block-slow - qemu:io-qcow2-014 [252-262/1366] 🌒 block-qcow2-optional+block-slow - qemu:io-qcow2-026 (...)I noticed a lot of these "optional+block-slow" tests being ran now, something that wasn't happening before.
If I use 'make check' I have the results I was having with 'ninja -C build test' before the recent changes.
I tried to bisect and got to this commit:
commit
daf0d008822be3cb14cdb533f7237c3c789bc373(HEAD)Author: Daniel P. Berrangé <[email protected]> Date: Mon Jan 12 13:01:49 2026 +0000iotests: remove redundant meson suite for iotests
Quoted 6 lines
From what I can tell this commit triggered (unintended?) stuff that was already in the code. In other words I am not sure if this commit is actually the culprit, so I am reluctant to even call this a bug.
My question is: should I be using 'ninja test'? It seems to me that the common practice is to use 'make check' and maybe I've been using an "unsupported" testing scheme.
"make check" is the normal way we expect developers to run tests.
That will trigger a moderately filtered set of tests suites that we think we reasonable to expect for day-to-day validation.
There are various other make targets that can enable additional tests that are known to ninja.
If you are directly using 'ninja test' you'll get everything and if that's too much, you need to use cli args to exclude certain suites of tests.
With regards,
Daniel
Signature · 3 lines
|: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|