Re: [PATCH v3 09/10] KVM: selftests: Support running stress save+restore and #PF test in L2

From: Yosry Ahmed

Date: Fri Jul 24 2026 - 13:46:36 EST


On Fri, Jul 24, 2026 at 10:37 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Mon, Jun 29, 2026, Yosry Ahmed wrote:
> > +static bool parse_args_nested(int argc, char *argv[])
> > +{
> > + bool nested = false;
> > + int opt;
> > +
> > + while ((opt = getopt(argc, argv, "n")) != -1) {
>
> Since the test ends up taking args anyways, might as well have it take the number
> of iterations too.
>
> But, why make it an either-or? If nested is supported, run the test non-nested
> and then run it nested. While I am sloooooowly working towards utilizing Vipin's
> selftest runner, IMO this is still basic functionality that should be tested by
> default, i.e. shouldn't require fancy opt-in.

Good point, I will refactor all the logic in main() into
run_test(nested), then run the test by default for both nested and
non-nested.