summary refs log tree commit diff stats
path: root/tests/functional/test_vnc.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-06-03 12:34:49 +0200
committerThomas Huth <thuth@redhat.com>2025-06-11 12:17:17 +0200
commitb894cc23f8fe6681b8bfc9679a6df1c976e9757a (patch)
tree6682e86efa1163bd22947065036aa04ecf192b29 /tests/functional/test_vnc.py
parent6ad3a47f15624176434490e895ac244375322607 (diff)
downloadfocaccia-qemu-b894cc23f8fe6681b8bfc9679a6df1c976e9757a.tar.gz
focaccia-qemu-b894cc23f8fe6681b8bfc9679a6df1c976e9757a.zip
tests/functional: Use the 'none' machine for the VNC test
The VNC test currently fails if the default machine ("pc" for x86)
has not been compiled into the binary. Since we also can test VNC
when QEMU just shows the default monitor, let's avoid this problem
by simply using the "none" machine (which is always available)
here instead.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250603103449.32499-1-thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_vnc.py')
-rwxr-xr-xtests/functional/test_vnc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py
index 5c0ee5f927..f1dd1597cf 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('none')
         self.vm.add_args('-nodefaults', '-S')
         self.vm.launch()
 
@@ -62,6 +63,7 @@ class Vnc(QemuSystemTest):
                 raise excp
 
     def test_change_password_requires_a_password(self):
+        self.set_machine('none')
         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 @@ class Vnc(QemuSystemTest):
                          'Could not set password')
 
     def test_change_password(self):
+        self.set_machine('none')
         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 @@ class Vnc(QemuSystemTest):
         self.assertTrue(check_connect(c))
 
     def test_change_listen(self):
+        self.set_machine('none')
         with Ports() as ports:
             a, b, c = ports.find_free_ports(3)
             self.do_test_change_listen(a, b, c)