qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 1/5] tests/functional: skip test if QEMU_TEST_QEMU_BINARY is not set
Date: Fri, 28 Feb 2025 09:50:53 +0000	[thread overview]
Message-ID: <Z8GG_dcCqo8_X4RR@redhat.com> (raw)
In-Reply-To: <a90b4f1f-8581-4647-9145-e52fc14ac604@redhat.com>

On Thu, Feb 06, 2025 at 10:01:45AM +0100, Thomas Huth wrote:
> On 05/02/2025 16.59, Daniel P. Berrangé wrote:
> > If QEMU_TEST_QEMU_BINARY is not set we currently assert in the setUp
> > function, resulting in a big traceback:
> > 
> >      TAP version 13
> >      Traceback (most recent call last):
> >        File "/var/home/berrange/src/virt/qemu/tests/functional/qemu_test/testcase.py", line 280, in setUp
> >          super().setUp('qemu-system-')
> >          ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
> >        File "/var/home/berrange/src/virt/qemu/tests/functional/qemu_test/testcase.py", line 196, in setUp
> >          self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be set')
> >          ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >      AssertionError: unexpectedly None : QEMU_TEST_QEMU_BINARY must be set
> > 
> >      not ok 1 test_ppc_405.Ppc405Machine.test_ppc_ref405ep
> >      1..1
> > 
> > For every other test pre-requisite that's missing we will mark the test
> > as skipped. This does the same for missing QEMU_TEST_QEMU_BINARY, such
> > that we get
> > 
> >      TAP version 13
> >      ok 1 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 2 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_noapic_nomsi # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 3 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_nomsi # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 4 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 5 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector_noapic # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 6 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_novector_nomsi # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      ok 7 test_x86_64_kvm_xen.KVMXenGuest.test_kvm_xen_guest_vapic # SKIP QEMU_TEST_QEMU_BINARY env variable is not set
> >      1..7
> 
> Not sure whether this is the right approach, since a missing
> QEMU_TEST_QEMU_BINARY is a real error, and if we just skip, then the problem
> might go unnoticed if the user does not look closely.
> 
> But to ease the situation: We could maybe add some auto-detection logic that
> tries to guess the right qemu-system-$TARGET by looking at the file name of
> the test and/or the test function name? We already encode the target
> architecture in most of these... WDYT?

When the user provides a binary, a single binary applies to all tests,
so tests that don't match the binary get skipped. I think it would be
a bit wierd to auto-select a different binary per test.

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 :|



  reply	other threads:[~2025-02-28  9:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 15:59 [PATCH 0/5] tests/functional: a few misc cleanups and fixes Daniel P. Berrangé
2025-02-05 15:59 ` [PATCH 1/5] tests/functional: skip test if QEMU_TEST_QEMU_BINARY is not set Daniel P. Berrangé
2025-02-06  9:01   ` Thomas Huth
2025-02-28  9:50     ` Daniel P. Berrangé [this message]
2025-02-05 15:59 ` [PATCH 2/5] tests/functional: remove unused 'bin_prefix' variable Daniel P. Berrangé
2025-02-06  9:23   ` Thomas Huth
2025-02-05 15:59 ` [PATCH 3/5] tests/functional: set 'qemu_bin' as an object level field Daniel P. Berrangé
2025-02-06  9:24   ` Thomas Huth
2025-02-05 15:59 ` [PATCH 4/5] tests/functional: remove all class level fields Daniel P. Berrangé
2025-02-06  9:27   ` Thomas Huth
2025-02-05 15:59 ` [PATCH 5/5] tests/functional: skip mem addr test on 32-bit hosts Daniel P. Berrangé
2025-02-05 16:40   ` Philippe Mathieu-Daudé
2025-02-05 16:53     ` Daniel P. Berrangé
2025-02-05 18:08       ` Philippe Mathieu-Daudé
2025-02-05 18:25       ` Richard Henderson
2025-02-06  9:29         ` Thomas Huth
2025-02-05 18:24   ` Richard Henderson
2025-02-05 18:47     ` Daniel P. Berrangé
2025-02-05 18:50       ` Richard Henderson
2025-02-06  9:35     ` Daniel P. Berrangé
2025-02-06  9:46       ` Thomas Huth

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=Z8GG_dcCqo8_X4RR@redhat.com \
    --to=berrange@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=philmd@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).