[PATCH v3 9/9] KVM: selftests: Provide README.rst for KVM selftests runner
Vipin Sharma
vipinsh at google.com
Fri Oct 10 12:38:19 PDT 2025
On Fri, Oct 10, 2025 at 11:14 AM Sean Christopherson <seanjc at google.com> wrote:
>
> On Fri, Oct 10, 2025, Brendan Jackman wrote:
> > To avoid confusing people and potentially leave the door open to a
> > cleaner integration, please can you add some bits here about how this
> > relates to the rest of the kselftest infrastructure? Some questions I
> > think are worth answering:
> >
It's a good point, I should write about how it compares with kselftest
infrastructure.
> > - As someone who runs KVM selftests, but doesn't work specifically on
> > KVM, to what extent do I need to know about this tool? Can I still run
> > the selftests "the old fashioned way" and if so what do I lose as
> > compared to using the KVM runner?
>
> The runner is purely optional. You'll lose whatever you don't have, that the
> runner provides. E.g. I have (hacky) scripts to run KVM selftests in parallel,
> but without much of the niceties provided by this runner.
>
For occasional contributors, it will provide opportunity to run the
default tests and run tests with different combinations of their
command line options. Overall, provides better test coverage and
confidence before sending patches upstream.
For regular contributors and maintainers, a fast execution of
selftests + more coverage. Runner allows them to configure output and
results as per their wish/workflows.
For everyone, to upload their interesting test combinations they use
so that the overall KVM community gets benefit out of it.
> > - Does this system change the "data model" of the selftests at all, and
> > if so how? I.e. I think (but honestly I'm not sure) that kselftests
> > are a 2-tier hierarchy of $suite:$test without any further
> > parameterisation or nesting (where there is more detail, it's hidden
> > as implementation details of individual $tests). Do the KVM selftests
> > have this structure?
>
> More or less.
>
> > If it differs, how does that effect the view from run_kselftest.sh?
>
> AFAIK, nothing in KVM selftests is at odds with run_kselftest.sh.
>
> > - I think (again, not very sure) that in kselftest that each $test is a
> > command executing a process. And this process communicates its status
> > by printing KTAP and returning an exit code. Is that stuff the same
> > for this runner?
>
> Yes? Except most KVM selftests don't support TAP (yet).
Here each test is executed in its own subprocess. Output of runner is
not in KTAP format, same for majority of the KVM tests.
Execution is any command written in *.test file, which is interpreted
as a command to execute in a shell. This allows us to write tests
which can run based on the resources on the host like number of vcpus
to use, how much memory to allocate, etc.
More information about the kvm-riscv
mailing list