Skip to contentSkip to conversation

tests/functional: Use the 'none' machine for the VNC test

PATCH In review Thomas Huth 3 participants 3 messages Jun 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/functional: Use the 'none' machine for the VNC test

From: Thomas Huth <[email protected]>

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.

---
 tests/functional/test_vnc.py | 4 ++++
 1 file changed, 4 insertions(+)
tests/functional/test_vnc.py +4 -0
index 5c0ee5f9272..f1dd1597cf1 100755
@@ -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 @@ def launch_guarded(self):
                 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 @@ def test_change_password_requires_a_password(self):
                          '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 @@ def do_test_change_listen(self, a, b, c):
         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)
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Thomas Huth

From: Thomas Huth <[email protected]>

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.

Quoted 4 lines
---
 tests/functional/test_vnc.py | 4 ++++
 1 file changed, 4 insertions(+)

With regards,
Daniel

Signature · 3 lines
|: 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 :|
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

From: Thomas Huth <[email protected]>

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.

Quoted 4 lines
---
  tests/functional/test_vnc.py | 4 ++++
  1 file changed, 4 insertions(+)