diff options
author | Thomas Huth <thuth@redhat.com> | 2024-12-18 14:14:37 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2025-01-02 08:58:08 +0100 |
commit | 56d3a1482921e7e23233f3abcce9c29f3f56cb72 (patch) | |
tree | 63199751fc2c2c8a41eddfb6928ed74afc4ba0df | |
parent | c82bfaf42dc6f8dbf101190c86cfa8af9ea400fd (diff) | |
download | qemu-56d3a1482921e7e23233f3abcce9c29f3f56cb72.zip qemu-56d3a1482921e7e23233f3abcce9c29f3f56cb72.tar.gz qemu-56d3a1482921e7e23233f3abcce9c29f3f56cb72.tar.bz2 |
tests/functional/test_vnc: Do not use a hard-coded VNC port
Two tests here are using the hard-coded VNC port :0 ... if there
is already a QEMU or other program running that is using this
port, the tests will be failing. Fortunately, QEMU can also
auto-detect a free port with the "to=..." parameter, so let's
use that for the tests to avoid the problem.
Message-ID: <20241218131439.255841-4-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
-rwxr-xr-x | tests/functional/test_vnc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional/test_vnc.py b/tests/functional/test_vnc.py index b769d3b..e632856 100755 --- a/tests/functional/test_vnc.py +++ b/tests/functional/test_vnc.py @@ -72,7 +72,7 @@ class Vnc(QemuSystemTest): 'Could not set password') def test_change_password_requires_a_password(self): - self.vm.add_args('-nodefaults', '-S', '-vnc', ':0') + self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999') self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) set_password_response = self.vm.qmp('change-vnc-password', @@ -84,7 +84,7 @@ class Vnc(QemuSystemTest): 'Could not set password') def test_change_password(self): - self.vm.add_args('-nodefaults', '-S', '-vnc', ':0,password=on') + self.vm.add_args('-nodefaults', '-S', '-vnc', ':1,to=999,password=on') self.vm.launch() self.assertTrue(self.vm.qmp('query-vnc')['return']['enabled']) self.vm.cmd('change-vnc-password', |