[PATCH v6 11/16] tests: use 'driver' as collective term for either format or protocol

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 11/16] tests: use 'driver' as collective term for either format or protocol
Posted by Daniel P. Berrangé 2 months ago
The I/O tests integration previously exclusively tested block formats
and now also covers the NBD protocol. Replace references to 'format'
with 'driver', as a generic term to collectively apply to either a
format or protocol.

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

diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst
index 8067d0a3ed..797111009a 100644
--- a/docs/devel/testing/main.rst
+++ b/docs/devel/testing/main.rst
@@ -222,7 +222,8 @@ check-block
 ~~~~~~~~~~~
 
 There are a variety of ways to exercise the block layer I/O tests
-via make targets.
+via make targets for a selection of formats / protocols (collectively
+referred to as ``drivers`` below).
 
 A default ``make check`` or ``make check-block`` command will exercise
 the ``qcow2`` format, using the tests tagged into the ``auto`` group
@@ -231,14 +232,14 @@ only.
 These targets accept the ``SPEED`` variable to augment the set of tests
 to run. A slightly more comprehensive test plan can be run by defining
 ``SPEED=slow``, which enables all tests for the ``qcow2`` and ``raw``
-formats. The most comprehensive test plan can be run by defining
-``SPEED=thorough``, which enables all available tests for the formats
+drivers. The most comprehensive test plan can be run by defining
+``SPEED=thorough``, which enables all available tests for the drivers
 ``luks``, ``nbd``, ``parallels``, ``qcow2``, ``qed``, ``raw``, ``vdi``,
 ``vhdx``, ``vmdk``, and ``vpc``.
 
-Each of formats also has its own dedicated make target, named
-``make check-block-$FORMAT`` which will run all available tests for
-the designated format and does not require the ``SPEED`` variable
+Each of drivers also has its own dedicated make target, named
+``make check-block-$DRIVER`` which will run all available tests for
+the designated driver and does not require the ``SPEED`` variable
 to be set.
 
 See the "QEMU iotests" section below for more information on the
diff --git a/tests/Makefile.include b/tests/Makefile.include
index a820980bbe..a063a1d60f 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -14,8 +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 (all formats)"
-	@echo " $(MAKE) check-block-FORMAT            Run block tests (only for FORMAT)"
+	@echo " $(MAKE) check-block                   Run block tests (all formats/protocols)"
+	@echo " $(MAKE) check-block-DRIVER            Run block tests (only for format/protocol 'DRIVER')"
 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 744d0b6e88..5d6b0b5ed9 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -12,7 +12,7 @@ qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
 qemu_iotests_env = {'PYTHON': python.full_path()}
 # If altering this definition, also update docs/devel/testing/main.rst
 # section on 'check-block' targets to reflect the changes
-qemu_iotests_formats = {
+qemu_iotests_drivers = {
   'qcow2': 'quick',
   'raw': 'slow',
   'luks': 'thorough',
@@ -33,8 +33,8 @@ endforeach
 
 qemu_iotests_check_cmd = files('check')
 
-foreach format, speed: qemu_iotests_formats
-  # Formats tagged 'quick' get the subset of tests in the 'auto'
+foreach format, speed: qemu_iotests_drivers
+  # Drivers tagged 'quick' get the subset of tests in the 'auto'
   # group, run by default with 'make check' / 'make check-block'
   seen = []
   if speed == 'quick'
-- 
2.54.0


Re: [PATCH v6 11/16] tests: use 'driver' as collective term for either format or protocol
Posted by Kevin Wolf 2 months ago
Am 13.05.2026 um 13:59 hat Daniel P. Berrangé geschrieben:
> The I/O tests integration previously exclusively tested block formats
> and now also covers the NBD protocol. Replace references to 'format'
> with 'driver', as a generic term to collectively apply to either a
> format or protocol.
> 
> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  docs/devel/testing/main.rst    | 13 +++++++------
>  tests/Makefile.include         |  4 ++--
>  tests/qemu-iotests/meson.build |  6 +++---
>  3 files changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst
> index 8067d0a3ed..797111009a 100644
> --- a/docs/devel/testing/main.rst
> +++ b/docs/devel/testing/main.rst
> @@ -222,7 +222,8 @@ check-block
>  ~~~~~~~~~~~
>  
>  There are a variety of ways to exercise the block layer I/O tests
> -via make targets.
> +via make targets for a selection of formats / protocols (collectively
> +referred to as ``drivers`` below).
>  
>  A default ``make check`` or ``make check-block`` command will exercise
>  the ``qcow2`` format, using the tests tagged into the ``auto`` group
> @@ -231,14 +232,14 @@ only.
>  These targets accept the ``SPEED`` variable to augment the set of tests
>  to run. A slightly more comprehensive test plan can be run by defining
>  ``SPEED=slow``, which enables all tests for the ``qcow2`` and ``raw``
> -formats. The most comprehensive test plan can be run by defining
> -``SPEED=thorough``, which enables all available tests for the formats
> +drivers. The most comprehensive test plan can be run by defining
> +``SPEED=thorough``, which enables all available tests for the drivers
>  ``luks``, ``nbd``, ``parallels``, ``qcow2``, ``qed``, ``raw``, ``vdi``,
>  ``vhdx``, ``vmdk``, and ``vpc``.
>  
> -Each of formats also has its own dedicated make target, named
> -``make check-block-$FORMAT`` which will run all available tests for
> -the designated format and does not require the ``SPEED`` variable
> +Each of drivers also has its own dedicated make target, named
> +``make check-block-$DRIVER`` which will run all available tests for
> +the designated driver and does not require the ``SPEED`` variable
>  to be set.
>  
>  See the "QEMU iotests" section below for more information on the
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index a820980bbe..a063a1d60f 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -14,8 +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 (all formats)"
> -	@echo " $(MAKE) check-block-FORMAT            Run block tests (only for FORMAT)"
> +	@echo " $(MAKE) check-block                   Run block tests (all formats/protocols)"
> +	@echo " $(MAKE) check-block-DRIVER            Run block tests (only for format/protocol 'DRIVER')"
>  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 744d0b6e88..5d6b0b5ed9 100644
> --- a/tests/qemu-iotests/meson.build
> +++ b/tests/qemu-iotests/meson.build
> @@ -12,7 +12,7 @@ qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
>  qemu_iotests_env = {'PYTHON': python.full_path()}
>  # If altering this definition, also update docs/devel/testing/main.rst
>  # section on 'check-block' targets to reflect the changes
> -qemu_iotests_formats = {
> +qemu_iotests_drivers = {
>    'qcow2': 'quick',
>    'raw': 'slow',
>    'luks': 'thorough',
> @@ -33,8 +33,8 @@ endforeach
>  
>  qemu_iotests_check_cmd = files('check')
>  
> -foreach format, speed: qemu_iotests_formats
> -  # Formats tagged 'quick' get the subset of tests in the 'auto'
> +foreach format, speed: qemu_iotests_drivers
> +  # Drivers tagged 'quick' get the subset of tests in the 'auto'
>    # group, run by default with 'make check' / 'make check-block'
>    seen = []
>    if speed == 'quick'

If we're updating code and comments internally, we should probably do
so consistently.

In the code, this foreach still uses a variable 'format', and in the
comments below we still have:

  # 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'
      ...

Kevin