From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
qemu-devel@nongnu.org, "Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v3 4/4] tests/functional: add -k TEST_NAME_PATTERN CLI arg
Date: Fri, 25 Jul 2025 15:48:33 +0100 [thread overview]
Message-ID: <aIOZQfMHt-jJUTSH@redhat.com> (raw)
In-Reply-To: <aIOF2gPa8nbec2qp@redhat.com>
On Fri, Jul 25, 2025 at 02:25:46PM +0100, Daniel P. Berrangé wrote:
> On Fri, Jul 25, 2025 at 12:41:25PM +0300, Manos Pitsidianakis wrote:
> > Add a CLI argument that takes fnmatch(3)-style patterns as value and can
> > be specified many times. Only tests that match the pattern will be
> > executed. This argument is passed to unittest.main which takes the same
> > argument.
> >
> > Acked-by: Thomas Huth <thuth@redhat.com>
> > Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> > ---
> > tests/functional/qemu_test/testcase.py | 23 +++++++++++++++++++++--
> > 1 file changed, 21 insertions(+), 2 deletions(-)
> One of the goals with the new functional test system was that we stop trying
> to (re-)invent a custom test runner harness, as was the case with Avocado,
> in favour of relying on the pre-existing python infrastructure to the
> greatest extent possible.
>
> Seeing this, and all the other CLI arg handling added in this series, makes
> me fairly uncomfortable, as it is effectively inventing a custom test runner
> once again which is exactly what we wanted to get away from.
>
> At the same time, there are some pieces in this series that do things that
> unittest.main() can't do on its own.
So considering the broader picture, we already have a load of tunables
on the test execution that we control exclusively via envirnoment
variables, as that gives us independance of the test runner, which
owns sys.argv processing.
So in terms of this series, IMHO, we should just add support for
QEMU_TEST_DEBUG=1 and QEMU_TEST_KEEP_SCRATCH=1 as two new tunables,
and not touch sys.argv at all.
With that, the only thing we're missing is a way to enumerate the
test cases, but IMHO that's the job of the test runner and thus
out of scope for QEMU to solve.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-07-25 14:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-25 9:41 [PATCH v3 0/4] tests/functional: add CLI args Manos Pitsidianakis
2025-07-25 9:41 ` [PATCH v3 1/4] tests/functional: add --debug CLI arg Manos Pitsidianakis
2025-07-25 12:44 ` Alex Bennée
2025-07-25 9:41 ` [PATCH v3 2/4] tests/functional: add --keep-scratch " Manos Pitsidianakis
2025-07-25 9:41 ` [PATCH v3 3/4] tests/functional: add --list-tests " Manos Pitsidianakis
2025-07-25 9:41 ` [PATCH v3 4/4] tests/functional: add -k TEST_NAME_PATTERN " Manos Pitsidianakis
2025-07-25 12:44 ` Alex Bennée
2025-07-25 13:25 ` Daniel P. Berrangé
2025-07-25 14:48 ` Daniel P. Berrangé [this message]
2025-07-26 6:54 ` Thomas Huth
2025-07-28 8:32 ` Daniel P. Berrangé
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=aIOZQfMHt-jJUTSH@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=gustavo.romero@linaro.org \
--cc=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).