Add a test with QEMU 2.4.0 capabilites, as well as the latest caps.
The code paths for formatting TLS options will be altered and
2.4.0 is the newest version where QEMU_CAPS_OBJECT_TLS_CREDS_X509
is not supported.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
.../qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args | 12 +++++++-----
.../graphics-vnc-tls.x86_64-latest.args | 17 +++++++++++------
tests/qemuxml2argvtest.c | 2 ++
3 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
index 3668fa889d..7b8e3a4aa6 100644
--- a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
@@ -6,10 +6,11 @@ LOGNAME=test \
SASL_CONF_PATH=/root/.sasl2 \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
--name QEMUGuest1 \
+-name guest=QEMUGuest1,debug-threads=on \
-S \
--machine pc,accel=tcg,usb=off,dump-guest-core=off \
+-machine pc-i440fx-2.4,accel=tcg,usb=off,dump-guest-core=off \
-m 214 \
+-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-no-user-config \
@@ -20,7 +21,8 @@ server,nowait \
-rtc base=utc \
-no-shutdown \
-no-acpi \
--boot c \
--usb \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-vnc 127.0.0.1:3,tls,x509verify=/etc/pki/libvirt-vnc,sasl \
--vga cirrus
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
index 3668fa889d..01743eff2a 100644
--- a/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
@@ -6,21 +6,26 @@ LOGNAME=test \
SASL_CONF_PATH=/root/.sasl2 \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i686 \
--name QEMUGuest1 \
+-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 \
-m 214 \
+-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-no-user-config \
-nodefaults \
--chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
--boot c \
--usb \
+-boot strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
-vnc 127.0.0.1:3,tls,x509verify=/etc/pki/libvirt-vnc,sasl \
--vga cirrus
+-device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a929e4314e..ca7b315567 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1194,6 +1194,8 @@ mymain(void)
driver.config->vncTLS = 1;
driver.config->vncTLSx509verify = 1;
DO_TEST("graphics-vnc-tls", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);
+ DO_TEST_CAPS_VER("graphics-vnc-tls", "2.4.0");
+ DO_TEST_CAPS_LATEST("graphics-vnc-tls");
driver.config->vncSASL = driver.config->vncTLSx509verify =
driver.config->vncTLS = 0;
VIR_FREE(driver.config->vncSASLdir);
VIR_FREE(driver.config->vncTLSx509certdir);
--
2.16.1