@samitouri / QOSamiQemu / commits / a9c326e080

iotests: use 'driver' as collective term for either format or protocol

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: Thomas Huth <thuth@redhat.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>

Daniel P. Berrangé committed Jan 14, 2026 at 10:43 UTC a9c326e080a52d7f7391aad069e1577d9cd5fdbb
3 files changed +21 -20
docs/devel/testing/main.rst
+7 -6
@@ -237,7 +237,8 @@ check-block
237 ~~~~~~~~~~~
238
239 There are a variety of ways to exercise the block layer I/O tests
240 -via make targets.
240 +via make targets for a selection of formats / protocols (collectively
241 +referred to as ``drivers`` below).
242
243 A default ``make check`` or ``make check-block`` command will exercise
244 the ``qcow2`` format, using the tests tagged into the ``auto`` group
@@ -246,14 +247,14 @@ only.
247 These targets accept the ``SPEED`` variable to augment the set of tests
248 to run. A slightly more comprehensive test plan can be run by defining
249 ``SPEED=slow``, which enables all tests for the ``qcow2`` and ``raw``
249 -formats. The most comprehensive test plan can be run by defining
250 -``SPEED=thorough``, which enables all available tests for the formats
250 +drivers. The most comprehensive test plan can be run by defining
251 +``SPEED=thorough``, which enables all available tests for the drivers
252 ``luks``, ``nbd``, ``parallels``, ``qcow2``, ``qed``, ``raw``, ``vdi``,
253 ``vhdx``, ``vmdk``, and ``vpc``.
254
254 -Each of formats also has its own dedicated make target, named
255 -``make check-block-$FORMAT`` which will run all available tests for
256 -the designated format and does not require the ``SPEED`` variable
255 +Each of drivers also has its own dedicated make target, named
256 +``make check-block-$DRIVER`` which will run all available tests for
257 +the designated driver and does not require the ``SPEED`` variable
258 to be set.
259
260 See the "QEMU iotests" section below for more information on the
tests/Makefile.include
+2 -2
@@ -14,8 +14,8 @@ check-help:
14 @echo " $(MAKE) check-unit Run qobject tests"
15 @echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
16 @echo " $(MAKE) check-tracetool Run tracetool generator tests"
17 - @echo " $(MAKE) check-block Run block tests (all formats)"
18 - @echo " $(MAKE) check-block-FORMAT Run block tests (only for FORMAT)"
17 + @echo " $(MAKE) check-block Run block tests (all formats/protocols)"
18 + @echo " $(MAKE) check-block-DRIVER Run block tests (only for format/protocol 'DRIVER')"
19 ifneq ($(filter $(all-check-targets), check-softfloat),)
20 @echo " $(MAKE) check-softfloat Run FPU emulation tests"
21 @echo " $(MAKE) check-tcg Run TCG tests"
tests/qemu-iotests/meson.build
+12 -12
@@ -12,7 +12,7 @@ qemu_iotests_binaries = [qemu_img, qemu_io, qemu_nbd, qsd]
12 qemu_iotests_env = {'PYTHON': python.full_path()}
13 # If altering this definition, also update docs/devel/testing/main.rst
14 # section on 'check-block' targets to reflect the changes
15 -qemu_iotests_formats = {
15 +qemu_iotests_drivers = {
16 'qcow2': 'quick',
17 'raw': 'slow',
18 'luks': 'thorough',
@@ -33,12 +33,12 @@ endforeach
33
34 qemu_iotests_check_cmd = files('check')
35
36 -foreach format, speed: qemu_iotests_formats
37 - # Formats tagged 'quick' get the subset of tests in the 'auto'
36 +foreach driver, speed: qemu_iotests_drivers
37 + # Drivers tagged 'quick' get the subset of tests in the 'auto'
38 # group, run by default with 'make check' / 'make check-block'
39 seen = []
40 if speed == 'quick'
41 - args = ['-tap', '-' + format, '-g', 'auto']
41 + args = ['-tap', '-' + driver, '-g', 'auto']
42 suites = ['block']
43
44 rc = run_command(
@@ -49,13 +49,13 @@ foreach format, speed: qemu_iotests_formats
49 foreach item: rc.stdout().strip().split()
50 seen += item
51 args = [qemu_iotests_check_cmd,
52 - '-tap', '-' + format, item,
52 + '-tap', '-' + driver, item,
53 '--source-dir', meson.current_source_dir(),
54 '--build-dir', meson.current_build_dir()]
55 # Some individual tests take as long as 45 seconds
56 # Bump the timeout to 3 minutes for some headroom
57 # on slow machines to minimize spurious failures
58 - test('io-' + format + '-' + item,
58 + test('io-' + driver + '-' + item,
59 python,
60 args: args,
61 depends: qemu_iotests_binaries,
@@ -66,9 +66,9 @@ foreach format, speed: qemu_iotests_formats
66 endforeach
67 endif
68
69 - # Every format gets put in the format specific suite
70 - suites = ['block-' + format + '-optional']
71 - # Any format tagged quick or slow also gets added to slow
69 + # Every driver gets put in the driver specific suite
70 + suites = ['block-' + driver + '-optional']
71 + # Any driver tagged quick or slow also gets added to slow
72 # otherwise its tagged thorough
73 if speed != 'thorough'
74 suites += ['block-slow']
@@ -76,7 +76,7 @@ foreach format, speed: qemu_iotests_formats
76 suites += ['block-thorough']
77 endif
78
79 - args = ['-tap', '-' + format]
79 + args = ['-tap', '-' + driver]
80
81 rc = run_command(
82 [python, qemu_iotests_check_cmd] + args + ['-n'],
@@ -91,13 +91,13 @@ foreach format, speed: qemu_iotests_formats
91 endif
92
93 args = [qemu_iotests_check_cmd,
94 - '-tap', '-' + format, item,
94 + '-tap', '-' + driver, item,
95 '--source-dir', meson.current_source_dir(),
96 '--build-dir', meson.current_build_dir()]
97 # Some individual tests take as long as 45 seconds
98 # Bump the timeout to 3 minutes for some headroom
99 # on slow machines to minimize spurious failures
100 - test('io-' + format + '-' + item,
100 + test('io-' + driver + '-' + item,
101 python,
102 args: args,
103 depends: qemu_iotests_binaries,