From: Sean Christopherson <seanjc@google.com>
To: Marc Zyngier <maz@kernel.org>
Cc: Vipin Sharma <vipinsh@google.com>,
kvm@vger.kernel.org, kvmarm@lists.linux.dev,
kvm-riscv@lists.infradead.org, pbonzini@redhat.com,
borntraeger@linux.ibm.com, frankja@linux.ibm.com,
imbrenda@linux.ibm.com, anup@brainfault.org,
atish.patra@linux.dev, zhaotianrui@loongson.cn,
maobibo@loongson.cn, chenhuacai@kernel.org,
oliver.upton@linux.dev, ajones@ventanamicro.com
Subject: Re: [PATCH v3 9/9] KVM: selftests: Provide README.rst for KVM selftests runner
Date: Thu, 2 Oct 2025 18:02:08 -0700 [thread overview]
Message-ID: <aN8gkEMHuvIVPcCt@google.com> (raw)
In-Reply-To: <86a529z7qh.wl-maz@kernel.org>
On Thu, Oct 02, 2025, Marc Zyngier wrote:
> On Wed, 01 Oct 2025 18:32:25 +0100,
> > One can run these non-default tests as (assuming current directory is
> > kvm selftests):
> >
> > python3 runner -d ./tests
> >
> > Over the time we will add more of these non-default interesting
> > testcases. One can then run:
> >
> > python3 runner -d ./tests ./testcases_default_gen
>
> That's not what I am complaining about. What you call "configuration"
> seems to just be "random set of parameters for a random test".
Hopefully s/random/interesting, but yes, the design of the runner is specifically
to support running tests with different parameters, and not much more (from a
configuration perspective).
> In practice, your runner does not seem configurable at all. You just
> treat all possible configurations of a single test as different tests.
>
> My (admittedly very personal) view of what a configuration should be
> is "run this single test with these parameters varying in these
> ranges, for this long".
Ya, but personal preference is precisely why we kept the runner fairly minimal.
The goal is to provide:
1. A way to upstream non-standard test invocations so that they can be shared
with others, and to improve the coverage provided when developers just run
whatever tests are upstream (which probably covers most contributions?).
2. Provide "basic" functionality so that each developer doesn't have to reinvent
the wheel.
E.g. I have a (horrific) bash script to run selftests in parallel, and while
it works well enough for my purposes, it's far from perfect, e.g. there's no
timeouts, it's super hard to see what tests are still running, the logging is
hacky, etc.
The idea with this runner is to deal with those low-level details that are
painful to implement from scratch, and that generally don't require foisting
a highly opinionated view on anyone. E.g. if someone really doesn't want to
see certain output, or wants to fully serialize tests, it's easy to do so.
3. Tooling that power users (and hoepfully CI?) can build on, e.g. via wrapper
scripts, or something even fancier, again without having to be too opinionated.
E.g. thanks to the myraid module params in x86, I run all selftests with 5-6
different versions of KVM (by unloading and reloading KVM modules). We
deliberately chose not to allow specifying module params of sysfs knobs as
part of the runner, because:
(a) Handling system-wide changes in a runner gets nasty because of the
need to express and track dependencies/conflicts.
(b) It's easy (or should be easy) to query dependencies in selftests.
(c) Selftests need to query them anyways, e.g. to avoid failure when
run with a "bad configuration".
(d) Permuting on system-wide things outside of the runner isn't terribly
difficult (and often requires elevated privileges).
So yeah, there are definitely limitations, but for the most part they are self-
imposed. Partly to avoid boiling the ocean in the initial version (e.g. many
tests won't benefit from running with a range of values/parameters), but also so
that we don't end up in a situation where the runner only suits the needs of a
few people, e.g. because it's too opinionated and/or tailored to certain use cases.
I'm definitely not against providing more functionality/flexibility in the future,
but for a first go I'd like to stick to a relatively minimal implementation.
next prev parent reply other threads:[~2025-10-03 1:02 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-30 16:36 [PATCH v3 0/9] KVM Selftest Runner Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 1/9] KVM: selftest: Create KVM selftest runner Vipin Sharma
2025-09-30 22:23 ` Vipin Sharma
2025-10-10 9:47 ` Brendan Jackman
2025-09-30 16:36 ` [PATCH v3 2/9] KVM: selftests: Provide executables path option to the " Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 3/9] KVM: selftests: Add timeout option in selftests runner Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 4/9] KVM: selftests: Add option to save selftest runner output to a directory Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 5/9] KVM: selftests: Run tests concurrently in KVM selftests runner Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 6/9] KVM: selftests: Add various print flags to KVM selftest runner Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 7/9] KVM: selftests: Print sticky KVM selftests runner status at bottom Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 8/9] KVM: selftests: Add rule to generate default tests for KVM selftests runner Vipin Sharma
2025-09-30 16:36 ` [PATCH v3 9/9] KVM: selftests: Provide README.rst " Vipin Sharma
2025-10-01 8:44 ` Marc Zyngier
2025-10-01 17:32 ` Vipin Sharma
2025-10-02 14:41 ` Marc Zyngier
2025-10-03 1:02 ` Sean Christopherson [this message]
2025-10-03 6:39 ` Vipin Sharma
2025-10-10 9:58 ` Brendan Jackman
2025-10-10 18:14 ` Sean Christopherson
2025-10-10 19:38 ` Vipin Sharma
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=aN8gkEMHuvIVPcCt@google.com \
--to=seanjc@google.com \
--cc=ajones@ventanamicro.com \
--cc=anup@brainfault.org \
--cc=atish.patra@linux.dev \
--cc=borntraeger@linux.ibm.com \
--cc=chenhuacai@kernel.org \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=vipinsh@google.com \
--cc=zhaotianrui@loongson.cn \
/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