]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Replace vnc unix socket tests with pinned versions
authorPeter Krempa <pkrempa@redhat.com>
Thu, 23 Sep 2021 14:57:43 +0000 (16:57 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Sep 2021 08:37:00 +0000 (10:37 +0200)
Replace the 3 unix socket tests with real caps versions to demonstrate
that supported qemus no longer use the old syntax.

DO_TEST_CAPS_LATEST versions will be added later.

This also removes duplicate invocation of 'graphics-vnc-socket'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/graphics-vnc-auto-socket-cfg.x86_64-2.11.0.args [moved from tests/qemuxml2argvdata/graphics-vnc-auto-socket-cfg.args with 79% similarity]
tests/qemuxml2argvdata/graphics-vnc-auto-socket.x86_64-2.11.0.args [moved from tests/qemuxml2argvdata/graphics-vnc-socket.args with 77% similarity]
tests/qemuxml2argvdata/graphics-vnc-socket.x86_64-2.11.0.args [moved from tests/qemuxml2argvdata/graphics-vnc-auto-socket.args with 78% similarity]
tests/qemuxml2argvtest.c

similarity index 79%
rename from tests/qemuxml2argvdata/graphics-vnc-auto-socket-cfg.args
rename to tests/qemuxml2argvdata/graphics-vnc-auto-socket-cfg.x86_64-2.11.0.args
index c0ff5b80fc12abe6d5b760281ee2e115471fa97e..81d3101d1430b72c7119301d6dd3ccc286398f91 100644 (file)
@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
 -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-2.11,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
 -realtime mlock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
@@ -24,9 +24,10 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--usb \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--vnc unix:/tmp/lib/domain--1-QEMUGuest1/vnc.sock \
+-vnc vnc=unix:/tmp/lib/domain--1-QEMUGuest1/vnc.sock \
 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 77%
rename from tests/qemuxml2argvdata/graphics-vnc-socket.args
rename to tests/qemuxml2argvdata/graphics-vnc-auto-socket.x86_64-2.11.0.args
index c40c289ccdaead865b642b0a85af4c4019161750..a1aedc053524b2f1614599a5aeb7d5f2c5aae767 100644 (file)
@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
 -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-2.11,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
 -realtime mlock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
@@ -24,7 +24,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--usb \
--vnc unix:/tmp/vnc.sock \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-vnc vnc=unix:/tmp/lib/domain--1-QEMUGuest1/vnc.sock \
 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
similarity index 78%
rename from tests/qemuxml2argvdata/graphics-vnc-auto-socket.args
rename to tests/qemuxml2argvdata/graphics-vnc-socket.x86_64-2.11.0.args
index fbbba9b0f467518d4fdbe9f80dddc48de54650d0..ca0293016b204a14aa36aeefcfc25e006b8343a1 100644 (file)
@@ -11,7 +11,7 @@ QEMU_AUDIO_DRV=none \
 -name guest=QEMUGuest1,debug-threads=on \
 -S \
 -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-2.11,accel=tcg,usb=off,dump-guest-core=off \
 -m 214 \
 -realtime mlock=off \
 -smp 1,sockets=1,cores=1,threads=1 \
@@ -24,7 +24,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--usb \
--vnc unix:/tmp/lib/domain--1-QEMUGuest1/vnc.sock \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-vnc vnc=unix:/tmp/vnc.sock \
 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index d6aeccba3f17d25f0ba5e5448bbe51a013959b6d..9a98c6ca88f84852a68b39ae89d0529d91d39813 100644 (file)
@@ -1450,8 +1450,11 @@ mymain(void)
     DO_TEST_CAPS_LATEST("graphics-egl-headless");
     DO_TEST_CAPS_LATEST("graphics-egl-headless-rendernode");
 
+    /* DO_TEST_CAPS_VER("graphics-vnc-*", "2.11.0"); were added as a demonstration
+     * that the old fake-caps tests were already using the new format, thus
+     * they can be removed without replacement when "2.11.0" will be retired */
     DO_TEST("graphics-vnc", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
-    DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST_CAPS_VER("graphics-vnc-socket", "2.11.0");
     DO_TEST("graphics-vnc-websocket",
             QEMU_CAPS_VNC,
             QEMU_CAPS_DEVICE_CIRRUS_VGA);
@@ -1463,12 +1466,9 @@ mymain(void)
     DO_TEST("graphics-vnc-remove-generated-socket", QEMU_CAPS_VNC,
             QEMU_CAPS_DEVICE_CIRRUS_VGA);
     driver.config->vncAutoUnixSocket = true;
-    DO_TEST("graphics-vnc-auto-socket-cfg", QEMU_CAPS_VNC,
-            QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST_CAPS_VER("graphics-vnc-auto-socket-cfg", "2.11.0");
     driver.config->vncAutoUnixSocket = false;
-    DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
-    DO_TEST("graphics-vnc-auto-socket", QEMU_CAPS_VNC,
-            QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    DO_TEST_CAPS_VER("graphics-vnc-auto-socket", "2.11.0");
     DO_TEST("graphics-vnc-none", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("graphics-vnc-socket-new-cmdline", QEMU_CAPS_VNC,
             QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_VNC_MULTI_SERVERS);