* [PATCH] tests/functional: fix querying available machines
@ 2026-07-10 9:03 Vladimir Sementsov-Ogievskiy
2026-07-10 9:59 ` Daniel P. Berrangé
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2026-07-10 9:03 UTC (permalink / raw)
To: th.huth+qemu; +Cc: qemu-devel, berrange, philmd, ganeshredcobra, vsementsov
Aliases are not handled, and that's why tests used them
are skipped, like this:
PYTHONPATH=python:tests/functional \
QEMU_TEST_QEMU_BINARY=$PWD/build/qemu-system-x86_64 \
MESON_BUILD_ROOT=$PWD/build \
./build/pyvenv/bin/python3 tests/functional/x86_64/test_hotplug_blk.py
TAP version 13
ok 1 test_hotplug_blk.HotPlugBlk.test # SKIP no support for machine q35
1..1
Fixes: 0e7aa78b0bee50 ("tests/functional: use QMP to query available machines")
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
---
tests/functional/qemu_test/testcase.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 4912a47a464..e4179d165c0 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -325,9 +325,12 @@ def set_machine(self, machinename):
resp = tmp_vm.qmp('query-machines')
machines = resp.get('return', [])
- cls._machines = [
- m.get('name') for m in machines if 'name' in m
- ]
+ cls._machines = []
+ for m in machines:
+ if 'name' in m:
+ cls._machines.append(m['name'])
+ if 'alias' in m:
+ cls._machines.append(m['alias'])
finally:
try:
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: fix querying available machines
2026-07-10 9:03 [PATCH] tests/functional: fix querying available machines Vladimir Sementsov-Ogievskiy
@ 2026-07-10 9:59 ` Daniel P. Berrangé
2026-07-10 13:42 ` Philippe Mathieu-Daudé
2026-07-12 8:11 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrangé @ 2026-07-10 9:59 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy
Cc: th.huth+qemu, qemu-devel, philmd, ganeshredcobra
On Fri, Jul 10, 2026 at 12:03:17PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Aliases are not handled, and that's why tests used them
> are skipped, like this:
>
> PYTHONPATH=python:tests/functional \
> QEMU_TEST_QEMU_BINARY=$PWD/build/qemu-system-x86_64 \
> MESON_BUILD_ROOT=$PWD/build \
> ./build/pyvenv/bin/python3 tests/functional/x86_64/test_hotplug_blk.py
>
> TAP version 13
> ok 1 test_hotplug_blk.HotPlugBlk.test # SKIP no support for machine q35
> 1..1
>
> Fixes: 0e7aa78b0bee50 ("tests/functional: use QMP to query available machines")
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> tests/functional/qemu_test/testcase.py | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: fix querying available machines
2026-07-10 9:03 [PATCH] tests/functional: fix querying available machines Vladimir Sementsov-Ogievskiy
2026-07-10 9:59 ` Daniel P. Berrangé
@ 2026-07-10 13:42 ` Philippe Mathieu-Daudé
2026-07-12 8:11 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-07-10 13:42 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy, th.huth+qemu
Cc: qemu-devel, berrange, philmd, ganeshredcobra
On 10/7/26 11:03, Vladimir Sementsov-Ogievskiy wrote:
> Aliases are not handled, and that's why tests used them
> are skipped, like this:
>
> PYTHONPATH=python:tests/functional \
> QEMU_TEST_QEMU_BINARY=$PWD/build/qemu-system-x86_64 \
> MESON_BUILD_ROOT=$PWD/build \
> ./build/pyvenv/bin/python3 tests/functional/x86_64/test_hotplug_blk.py
>
> TAP version 13
> ok 1 test_hotplug_blk.HotPlugBlk.test # SKIP no support for machine q35
> 1..1
>
> Fixes: 0e7aa78b0bee50 ("tests/functional: use QMP to query available machines")
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> tests/functional/qemu_test/testcase.py | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] tests/functional: fix querying available machines
2026-07-10 9:03 [PATCH] tests/functional: fix querying available machines Vladimir Sementsov-Ogievskiy
2026-07-10 9:59 ` Daniel P. Berrangé
2026-07-10 13:42 ` Philippe Mathieu-Daudé
@ 2026-07-12 8:11 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2026-07-12 8:11 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy; +Cc: qemu-devel, berrange, philmd, ganeshredcobra
Am Fri, 10 Jul 2026 12:03:17 +0300
schrieb Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>:
> Aliases are not handled, and that's why tests used them
> are skipped, like this:
>
> PYTHONPATH=python:tests/functional \
> QEMU_TEST_QEMU_BINARY=$PWD/build/qemu-system-x86_64 \
> MESON_BUILD_ROOT=$PWD/build \
> ./build/pyvenv/bin/python3 tests/functional/x86_64/test_hotplug_blk.py
>
> TAP version 13
> ok 1 test_hotplug_blk.HotPlugBlk.test # SKIP no support for machine q35
> 1..1
>
> Fixes: 0e7aa78b0bee50 ("tests/functional: use QMP to query available machines")
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> tests/functional/qemu_test/testcase.py | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
> index 4912a47a464..e4179d165c0 100644
> --- a/tests/functional/qemu_test/testcase.py
> +++ b/tests/functional/qemu_test/testcase.py
> @@ -325,9 +325,12 @@ def set_machine(self, machinename):
> resp = tmp_vm.qmp('query-machines')
>
> machines = resp.get('return', [])
> - cls._machines = [
> - m.get('name') for m in machines if 'name' in m
> - ]
> + cls._machines = []
> + for m in machines:
> + if 'name' in m:
> + cls._machines.append(m['name'])
> + if 'alias' in m:
> + cls._machines.append(m['alias'])
Thanks for the fix!
Reviewed-by: Thomas Huth <th.huth+qemu@posteo.eu>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-12 8:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 9:03 [PATCH] tests/functional: fix querying available machines Vladimir Sementsov-Ogievskiy
2026-07-10 9:59 ` Daniel P. Berrangé
2026-07-10 13:42 ` Philippe Mathieu-Daudé
2026-07-12 8:11 ` Thomas Huth
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.