From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"John Snow" <jsnow@redhat.com>, "Cleber Rosa" <crosa@redhat.com>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>
Subject: Re: [PATCH] meson: Fix meson suites invocation from make check
Date: Mon, 21 Sep 2026 11:52:27 +0100 [thread overview]
Message-ID: <arEMa6GTGGdIC1rZ@redhat.com> (raw)
In-Reply-To: <20260918203153.3874488-1-farosas@suse.de>
On Fri, Sep 18, 2026 at 05:31:52PM -0300, Fabiano Rosas wrote:
> make check is currently by default running tests tagged
> "slow". Running make check with no SPEED variable set should be
> equivalent to SPEED=quick and run the meson 'quick' test setup, which
> explicitly excludes slow tests:
Can you give an example of some tests that you think should not
be running.
I just run 'make check' and looked at two examples
tests/unit/test-crypto-pbkdf.c skips registering some tests
unless "SPEED=slow" and that correctly skipped them.
tests/qemu-iotests/meson.build skips running 'raw' format tests
unless SPEED=slow, and that appears to be correctly working,
only running qcow2 format tests by default.
>
> add_test_setup('quick', exclude_suites: ['slow', 'thorough'] ...
>
> The problem is that the mtest2make.py script is effectively overriding
> the "meson test --setup" setting by using --suite which takes
> precedence over --setup according to meson documentation.
>
> Fix by excluding suites directly with the "--no-suite" option while
> generating Makefile.mtest.
>
> Although the 'exclude_suites' in meson.build are useless for make
> check, they still help when running 'meson test' from the
> command-line, so keep them around.
>
> For the configure line I'm using:
>
> make check goes from 1100 to 996 tests
> make SPEED=slow check stays at 2158 tests
> make SPEED=thorough check stays at 2279 tests
>
> (the rest of the test targets look sane, but maintainers please
> double-check)
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> - With this change we obviously lose coverage in make check. I suggest
> we use this opportunity to review what gets put in the quick
> suite.
>
> For migration, I want to keep only the smoke tests in make
> check. I'll send a patch adding them back if this change is
> accepted.
>
> - Some of the suffixes from functional tests could probably be removed
> and rely on having the tests in the proper suite instead. I.e. use
> 'slow' instead of 'foobar_slow'.
> ---
> scripts/mtest2make.py | 11 +++++++++--
> tests/qemu-iotests/meson.build | 2 +-
> 2 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py
> index 383ea68b16..a61a83f775 100644
> --- a/scripts/mtest2make.py
> +++ b/scripts/mtest2make.py
> @@ -26,6 +26,11 @@ def names(self, base):
> .speed.slow = $(sort $(filter-out %-thorough, $1))
> .speed.thorough = $(sort $1)
>
> +.speed_exclude_suites.quick = --no-suite slow --no-suite thorough \
> + --no-suite optional
> +.speed_exclude_suites.slow = --no-suite thorough
> +.speed_exclude_suites.thorough =
> +
> TIMEOUT_MULTIPLIER ?= 1
> .mtestargs = --no-rebuild -t $(TIMEOUT_MULTIPLIER)
> ifneq ($(SPEED), quick)
> @@ -34,7 +39,8 @@ def names(self, base):
> .mtestargs += $(subst -j,--num-processes , $(filter-out -j, $(lastword -j1 $(filter -j%, $(MAKEFLAGS)))))
>
> .check.mtestargs = $(MTESTARGS) $(.mtestargs) $(if $(V),--verbose,--print-errorlogs) \
> - $(foreach s, $(sort $(.check.mtest-suites)), --suite $s)
> + $(foreach s, $(sort $(.check.mtest-suites)), --suite $s) \
> + $(.speed_exclude_suites.$(SPEED))
> .bench.mtestargs = $(MTESTARGS) $(.mtestargs) --benchmark --verbose \
> $(foreach s, $(sort $(.bench.mtest-suites)), --suite $s)''')
>
> @@ -102,7 +108,8 @@ def emit_suite(name, suite, prefix):
> targets += f' {prefix} {prefix}-report.junit.xml'
> print(f'ifneq ($(filter {targets}, $(MAKECMDGOALS)),)')
> # for the "base" suite possibly add FOO-slow and FOO-thorough
> - print(f".{prefix}.mtest-suites += {name} $(call .speed.$(SPEED), {names})")
> + print(f".{prefix}.mtest-suites += {name} $(call .speed.$(SPEED), {names}) "
> + ".speed_exclude_suites.$(SPEED)")
> print(f'endif')
>
> targets = {t['id']: [os.path.relpath(f) for f in t['filename']]
> diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
> index 8857f25f29..34cfcdc53b 100644
> --- a/tests/qemu-iotests/meson.build
> +++ b/tests/qemu-iotests/meson.build
> @@ -68,7 +68,7 @@ foreach driver, speed: qemu_iotests_drivers
> endif
>
> # Every driver gets put in the driver specific suite
> - suites = ['block-' + driver + '-optional']
> + suites = ['block-' + driver + '-optional', 'optional']
> # Any driver tagged quick or slow also gets added to slow
> # otherwise its tagged thorough
> if speed != 'thorough'
> --
> 2.53.0
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-09-21 10:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 20:31 [PATCH] meson: Fix meson suites invocation from make check Fabiano Rosas
2026-09-21 5:35 ` Thomas Huth
2026-09-21 10:52 ` Daniel P. Berrangé [this message]
2026-09-21 14:28 ` Fabiano Rosas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=arEMa6GTGGdIC1rZ@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=crosa@redhat.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=imammedo@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.