From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] tests/functional: Set 'pc' machine type instead of relying on the default
Date: Wed, 21 May 2025 16:26:24 +0100 [thread overview]
Message-ID: <aC3woEjL0UxXYavt@redhat.com> (raw)
In-Reply-To: <20250521151323.155232-1-thuth@redhat.com>
On Wed, May 21, 2025 at 05:13:23PM +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> In case the default machine has not been compiled into the QEMU
> binary, the vnc and the cpu_hotplug_props test are currently
> failing. Add a set_machine('pc') here to make sure that the tests
> are correctly skipped in case the machine is not available.
Hmmm, this is making this test be tied exclusively to x86.
If we can't ever omit the machine, then effectively all
our tests have to be tied to a specific target arch ?
What scenario did you find that 'pc' wasn't compiled
into QEMU x86 targets ? Shouldn't a new defualt
machine have been picked, or should our test harness
be picking a default for each targets if no 'set_machine'
call is present, to preserve target portability ?
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/functional/test_pc_cpu_hotplug_props.py | 1 +
> tests/functional/test_vnc.py | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/tests/functional/test_pc_cpu_hotplug_props.py b/tests/functional/test_pc_cpu_hotplug_props.py
> index 9d5a37cb170..2bed8ada023 100755
> --- a/tests/functional/test_pc_cpu_hotplug_props.py
> +++ b/tests/functional/test_pc_cpu_hotplug_props.py
> @@ -26,6 +26,7 @@
> class OmittedCPUProps(QemuSystemTest):
>
> def test_no_die_id(self):
> + self.set_machine('pc')
> self.vm.add_args('-nodefaults', '-S')
> self.vm.add_args('-smp', '1,sockets=2,cores=2,threads=2,maxcpus=8')
> self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0')
> diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py
> index 5c0ee5f9272..cbb01f00c7b 100755
> --- a/tests/functional/test_vnc.py
> +++ b/tests/functional/test_vnc.py
> @@ -31,6 +31,7 @@ def check_connect(port: int) -> bool:
> class Vnc(QemuSystemTest):
>
> def test_no_vnc_change_password(self):
> + self.set_machine('pc')
> self.vm.add_args('-nodefaults', '-S')
> self.vm.launch()
>
> @@ -62,6 +63,7 @@ def launch_guarded(self):
> raise excp
>
> def test_change_password_requires_a_password(self):
> + self.set_machine('pc')
> self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999')
> self.launch_guarded()
> self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
> @@ -74,6 +76,7 @@ def test_change_password_requires_a_password(self):
> 'Could not set password')
>
> def test_change_password(self):
> + self.set_machine('pc')
> self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999,password=on')
> self.launch_guarded()
> self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled'])
> @@ -103,6 +106,7 @@ def do_test_change_listen(self, a, b, c):
> self.assertTrue(check_connect(c))
>
> def test_change_listen(self):
> + self.set_machine('pc')
> with Ports() as ports:
> a, b, c = ports.find_free_ports(3)
> self.do_test_change_listen(a, b, c)
> --
> 2.49.0
>
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 :|
next prev parent reply other threads:[~2025-05-21 15:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 15:13 [PATCH] tests/functional: Set 'pc' machine type instead of relying on the default Thomas Huth
2025-05-21 15:26 ` Daniel P. Berrangé [this message]
2025-05-22 8:15 ` 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=aC3woEjL0UxXYavt@redhat.com \
--to=berrange@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.