[PATCH v6 08/16] tests: add a meson suite / make target per block I/O tests format

Daniel P. Berrangé posted 16 patches 2 months ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
There is a newer version of this series
[PATCH v6 08/16] tests: add a meson suite / make target per block I/O tests format
Posted by Daniel P. Berrangé 2 months ago
Currently each block format is classified as either 'quick', 'slow' or
'thorough' and this controls whether its I/O tests are added to the meson
suites 'block-quick', 'block-slow' or 'block-thorough'.

This suites are exposed the 'check-block' make target, accepting the
optional SPEED variable.

As we add more formats to the 'thorough' group, however, it becomes
increasingly large and time consuming to run. What is needed is a make
target that can exercise all tests for an individual format, regardless
of speed classification.

This makes use of the previous enhancement to mtest2make.py to introduce
new meson suites 'block-$FORMAT-optional', which translate to new top
level make targets 'check-block-$FORMAT'. These new targets always run
all tests and as such do not need the SPEED variable to be set, but are
not triggered by 'make check' or 'make check-block'.

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 tests/Makefile.include         | 3 ++-
 tests/qemu-iotests/meson.build | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index f257288194..a820980bbe 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -14,7 +14,8 @@ check-help:
 	@echo " $(MAKE) check-unit                    Run qobject tests"
 	@echo " $(MAKE) check-qapi-schema             Run QAPI schema tests"
 	@echo " $(MAKE) check-tracetool               Run tracetool generator tests"
-	@echo " $(MAKE) check-block                   Run block tests"
+	@echo " $(MAKE) check-block                   Run block tests (all formats)"
+	@echo " $(MAKE) check-block-FORMAT            Run block tests (only for FORMAT)"
 ifneq ($(filter $(all-check-targets), check-softfloat),)
 	@echo " $(MAKE) check-softfloat               Run FPU emulation tests"
 	@echo " $(MAKE) check-tcg                     Run TCG tests"
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index 1a24d801a3..16a5e39476 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -62,7 +62,8 @@ foreach format, speed: qemu_iotests_formats
     endforeach
   endif
 
-  suites = []
+  # Every format gets put in the format specific suite
+  suites = ['block-' + format + '-optional']
   # Any format tagged quick or slow also gets added to slow
   # otherwise its tagged thorough
   if speed != 'thorough'
-- 
2.54.0


Re: [PATCH v6 08/16] tests: add a meson suite / make target per block I/O tests format
Posted by Kevin Wolf 2 months ago
Am 13.05.2026 um 13:59 hat Daniel P. Berrangé geschrieben:
> Currently each block format is classified as either 'quick', 'slow' or
> 'thorough' and this controls whether its I/O tests are added to the meson
> suites 'block-quick', 'block-slow' or 'block-thorough'.
> 
> This suites are exposed the 'check-block' make target, accepting the
> optional SPEED variable.
> 
> As we add more formats to the 'thorough' group, however, it becomes
> increasingly large and time consuming to run. What is needed is a make
> target that can exercise all tests for an individual format, regardless
> of speed classification.
> 
> This makes use of the previous enhancement to mtest2make.py to introduce
> new meson suites 'block-$FORMAT-optional', which translate to new top
> level make targets 'check-block-$FORMAT'. These new targets always run
> all tests and as such do not need the SPEED variable to be set, but are
> not triggered by 'make check' or 'make check-block'.
> 
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Reviewed-by: Kevin Wolf <kwolf@redhat.com>