117 lines
4.1 KiB
Diff
117 lines
4.1 KiB
Diff
From 0f5bad99762f92f7b7a0e65e68fbb83bad787a4a Mon Sep 17 00:00:00 2001
|
|
Message-Id: <0f5bad99762f92f7b7a0e65e68fbb83bad787a4a@dist-git>
|
|
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
Date: Tue, 28 Aug 2018 12:46:44 +0200
|
|
Subject: [PATCH] tests: qemu: test more versions for graphics-vnc-tls
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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@redhat.com>
|
|
(cherry picked from commit 11b5396ceabe2ca91d8110f172f3ccf0d3901111)
|
|
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
|
https: //bugzilla.redhat.com/show_bug.cgi?id=1598167
|
|
Reviewed-by: Erik Skultety <eskultet@redhat.com>
|
|
---
|
|
.../graphics-vnc-tls.x86_64-2.4.0.args | 28 +++++++++++++++++
|
|
.../graphics-vnc-tls.x86_64-latest.args | 31 +++++++++++++++++++
|
|
tests/qemuxml2argvtest.c | 2 ++
|
|
3 files changed, 61 insertions(+)
|
|
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
|
|
create mode 100644 tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
|
|
|
|
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
|
|
new file mode 100644
|
|
index 0000000000..7b8e3a4aa6
|
|
--- /dev/null
|
|
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-2.4.0.args
|
|
@@ -0,0 +1,28 @@
|
|
+LC_ALL=C \
|
|
+PATH=/bin \
|
|
+HOME=/home/test \
|
|
+USER=test \
|
|
+LOGNAME=test \
|
|
+SASL_CONF_PATH=/root/.sasl2 \
|
|
+QEMU_AUDIO_DRV=none \
|
|
+/usr/bin/qemu-system-i686 \
|
|
+-name guest=QEMUGuest1,debug-threads=on \
|
|
+-S \
|
|
+-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 \
|
|
+-nodefaults \
|
|
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
|
|
+server,nowait \
|
|
+-mon chardev=charmonitor,id=monitor,mode=control \
|
|
+-rtc base=utc \
|
|
+-no-shutdown \
|
|
+-no-acpi \
|
|
+-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 \
|
|
+-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
|
|
new file mode 100644
|
|
index 0000000000..01743eff2a
|
|
--- /dev/null
|
|
+++ b/tests/qemuxml2argvdata/graphics-vnc-tls.x86_64-latest.args
|
|
@@ -0,0 +1,31 @@
|
|
+LC_ALL=C \
|
|
+PATH=/bin \
|
|
+HOME=/home/test \
|
|
+USER=test \
|
|
+LOGNAME=test \
|
|
+SASL_CONF_PATH=/root/.sasl2 \
|
|
+QEMU_AUDIO_DRV=none \
|
|
+/usr/bin/qemu-system-i686 \
|
|
+-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,fd=1729,server,nowait \
|
|
+-mon chardev=charmonitor,id=monitor,mode=control \
|
|
+-rtc base=utc \
|
|
+-no-shutdown \
|
|
+-no-acpi \
|
|
+-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 \
|
|
+-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 02bb9889ee..608a2b6ce3 100644
|
|
--- a/tests/qemuxml2argvtest.c
|
|
+++ b/tests/qemuxml2argvtest.c
|
|
@@ -1207,6 +1207,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.18.0
|
|
|