[libvirt PATCH 05/14] tests: Limit use of SPICE TLS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Follow the example of other similar settings and only enable it
for the few test cases that are actually about the specific
functionality, disabling it immediately afterwards.

A few test cases that were completely unrelated to SPICE TLS no
longer see the effects of having the feature enabled.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 tests/qemuxml2argvdata/controller-order.args        |  2 +-
 .../q35-virt-manager-basic.x86_64-4.2.0.args        |  2 +-
 .../q35-virt-manager-basic.x86_64-latest.args       |  2 +-
 tests/qemuxml2argvtest.c                            | 13 ++++++++++++-
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/tests/qemuxml2argvdata/controller-order.args b/tests/qemuxml2argvdata/controller-order.args
index 242639591c..cc45b1f946 100644
--- a/tests/qemuxml2argvdata/controller-order.args
+++ b/tests/qemuxml2argvdata/controller-order.args
@@ -43,7 +43,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fdr/.config \
 -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
 -device usb-tablet,id=input0,bus=usb.0,port=1.2 \
 -audiodev '{"id":"audio1","driver":"spice"}' \
--spice port=5901,tls-port=5902,addr=0.0.0.0,x509-dir=/etc/pki/libvirt-spice,seamless-migration=on \
+-spice port=5901,addr=0.0.0.0,seamless-migration=on \
 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2 \
 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 \
 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
index 042f965183..86da1e46ab 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
@@ -49,7 +49,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
 -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 \
 -device usb-tablet,id=input0,bus=usb.0,port=1 \
 -audiodev '{"id":"audio1","driver":"spice"}' \
--spice port=5901,tls-port=5902,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice,image-compression=off,seamless-migration=on \
+-spice port=5901,addr=127.0.0.1,image-compression=off,seamless-migration=on \
 -device qxl-vga,id=video0,max_outputs=1,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,bus=pcie.0,addr=0x1 \
 -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b \
 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 \
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
index de4443c4ab..4b53442846 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
@@ -49,7 +49,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
 -device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":2,"chardev":"charchannel1","id":"channel1","name":"com.redhat.spice.0"}' \
 -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
 -audiodev '{"id":"audio1","driver":"spice"}' \
--spice port=5901,tls-port=5902,addr=127.0.0.1,x509-dir=/etc/pki/libvirt-spice,image-compression=off,seamless-migration=on \
+-spice port=5901,addr=127.0.0.1,image-compression=off,seamless-migration=on \
 -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \
 -device '{"driver":"ich9-intel-hda","id":"sound0","bus":"pcie.0","addr":"0x1b"}' \
 -device '{"driver":"hda-duplex","id":"sound0-codec0","bus":"sound0.0","cad":0,"audiodev":"audio1"}' \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 2f2983da79..afa22275b8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -858,7 +858,6 @@ mymain(void)
     driver.config->hugetlbfs[0].size = 2048;
     driver.config->hugetlbfs[0].deflt = true;
     driver.config->hugetlbfs[1].size = 1048576;
-    driver.config->spiceTLS = 1;
     driver.config->spicePassword = g_strdup("123456");
     VIR_FREE(driver.config->memoryBackingDir);
     driver.config->memoryBackingDir = g_strdup("/var/lib/libvirt/qemu/ram");
@@ -1297,6 +1296,8 @@ mymain(void)
     DO_TEST_CAPS_LATEST("disk-network-tlsx509-nbd-hostname");
     DO_TEST_CAPS_VER("disk-network-tlsx509-vxhs", "5.0.0");
     DO_TEST_CAPS_LATEST("disk-network-http");
+    VIR_FREE(driver.config->nbdTLSx509secretUUID);
+    VIR_FREE(driver.config->vxhsTLSx509secretUUID);
     driver.config->vxhsTLS = 0;
     DO_TEST_CAPS_LATEST("disk-no-boot");
     DO_TEST_CAPS_LATEST("disk-nvme");
@@ -1404,6 +1405,8 @@ mymain(void)
     DO_TEST_CAPS_LATEST_PARSE_ERROR("graphics-sdl-egl-headless");
     DO_TEST("graphics-sdl-fullscreen",
             QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SDL);
+
+    driver.config->spiceTLS = 1;
     DO_TEST_CAPS_LATEST("graphics-spice");
     DO_TEST_CAPS_LATEST("graphics-spice-no-args");
     driver.config->spiceSASL = 1;
@@ -1423,6 +1426,7 @@ mymain(void)
     DO_TEST_CAPS_LATEST("graphics-spice-egl-headless");
     DO_TEST_CAPS_LATEST_PARSE_ERROR("graphics-spice-invalid-egl-headless");
     DO_TEST_CAPS_LATEST("graphics-spice-gl-auto-rendernode");
+    driver.config->spiceTLS = 0;
 
     DO_TEST("graphics-dbus",
             QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_DISPLAY_DBUS);
@@ -1505,10 +1509,12 @@ mymain(void)
 
     DO_TEST("serial-file-log",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
+    driver.config->spiceTLS = 1;
     DO_TEST("serial-spiceport",
             QEMU_CAPS_DEVICE_QXL,
             QEMU_CAPS_SPICE,
             QEMU_CAPS_DEVICE_ISA_SERIAL);
+    driver.config->spiceTLS = 0;
 
     DO_TEST("console-compat",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
@@ -1528,7 +1534,9 @@ mymain(void)
     DO_TEST("serial-unix-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST_CAPS_LATEST("serial-file-log");
+    driver.config->spiceTLS = 1;
     DO_TEST_CAPS_LATEST("serial-spiceport");
+    driver.config->spiceTLS = 0;
     DO_TEST_CAPS_LATEST("serial-debugcon");
 
     DO_TEST_CAPS_LATEST("console-compat");
@@ -1568,6 +1576,7 @@ mymain(void)
     DO_TEST("serial-tcp-tlsx509-secret-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
     DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-secret-chardev");
+    VIR_FREE(driver.config->chardevTLSx509secretUUID);
     driver.config->chardevTLS = 0;
     DO_TEST("serial-many-chardev",
             QEMU_CAPS_DEVICE_ISA_SERIAL);
@@ -1597,9 +1606,11 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("console-virtio-ccw", "s390x");
     DO_TEST_CAPS_LATEST("console-virtio-unix");
     DO_TEST_CAPS_ARCH_LATEST("console-sclp", "s390x");
+    driver.config->spiceTLS = 1;
     DO_TEST("channel-spicevmc",
             QEMU_CAPS_SPICE,
             QEMU_CAPS_DEVICE_CIRRUS_VGA);
+    driver.config->spiceTLS = 0;
     DO_TEST_CAPS_LATEST("channel-qemu-vdagent");
     DO_TEST_CAPS_LATEST("channel-qemu-vdagent-features");
     DO_TEST("channel-virtio-default",
-- 
2.39.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux