Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	 kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH] runtime: Skip tests if the target "kernel" file doesn't exist
Date: Fri, 30 May 2025 17:32:40 +0200	[thread overview]
Message-ID: <20250530-cc607e1b406bb1baa3b29667@orel> (raw)
In-Reply-To: <aDnOZc9FS59AV3pH@google.com>

On Fri, May 30, 2025 at 08:27:33AM -0700, Sean Christopherson wrote:
> On Fri, May 30, 2025, Andrew Jones wrote:
> > On Thu, May 29, 2025 at 01:58:20PM -0700, Sean Christopherson wrote:
> > > Skip the test if its target kernel/test file isn't available so that
> > > skipping a test that isn't supported for a given config doesn't require
> > > manually flagging the testcase in unittests.cfg.  This fixes "failures"
> > > on x86 with CONFIG_EFI=y due to some tests not being built for EFI, but
> > > not being annotated in x86/unittests.cfg.
> > > 
> > > Alternatively, testcases could be marked noefi (or efi-only), but that'd
> > > require more manual effort, and there's no obvious advantage to doing so.
> > > 
> > > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > > ---
> > >  scripts/runtime.bash | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> > > index ee229631..a94d940d 100644
> > > --- a/scripts/runtime.bash
> > > +++ b/scripts/runtime.bash
> > > @@ -150,6 +150,11 @@ function run()
> > >          done
> > >      fi
> > >  
> > > +    if [ ! -f "$kernel" ]; then
> > > +        print_result "SKIP" $testname "" "Test file '$kernel' not found";
> > > +        return 2;
> > > +    fi
> > > +
> > 
> > I see mkstandalone.sh already has something like this. There's still one
> > other place, though, which is print_testname(). Should we filter tests
> > from the listing that are missing their kernels?
> 
> Huh, TIL you can list testcases :-)
> 
> I would say no?  Because then listing testcases would depend on a successful
> build, which would be annoying in a variety of scenarios.
> 
> It would also be weird to list testcases that are excluded based on e.g. arch,
> but not list testcases that are effectively excluded via Makefile.

Sounds reasonable.

Reviewed-by: Andrew Jones <andrew.jones@linux.dev>

Thanks,
drew

  reply	other threads:[~2025-05-30 15:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29 20:58 [kvm-unit-tests PATCH] runtime: Skip tests if the target "kernel" file doesn't exist Sean Christopherson
2025-05-30  6:15 ` Andrew Jones
2025-05-30 15:27   ` Sean Christopherson
2025-05-30 15:32     ` Andrew Jones [this message]
2025-06-10 19:42 ` Sean Christopherson

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=20250530-cc607e1b406bb1baa3b29667@orel \
    --to=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --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