Hi
On Wed, May 11, 2016 at 5:08 PM, Pavel Hrdina <phrdina(a)redhat.com> wrote:
Commit 55320c23 introduced a new test for VNC to test if
vnc_auto_unix_socket is set in qemu.conf, but forget to enable it in
qemuxml2argvtest.c. This patch also moves the code in qemuxml2xmltest.c
next to other VNC tests.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
.../qemuxml2argv-graphics-vnc-auto-socket-cfg.args | 22 ++++++++++++
.../qemuxml2argv-graphics-vnc-auto-socket-cfg.xml | 34 ++++++++++++++++++
.../qemuxml2argv-graphics-vnc-autosocket.args | 22 ------------
.../qemuxml2argv-graphics-vnc-autosocket.xml | 34 ------------------
tests/qemuxml2argvtest.c | 3 ++
...qemuxml2xmlout-graphics-vnc-auto-socket-cfg.xml | 41 ++++++++++++++++++++++
.../qemuxml2xmlout-graphics-vnc-autosocket.xml | 41 ----------------------
tests/qemuxml2xmltest.c | 11 +++---
8 files changed, 106 insertions(+), 102 deletions(-)
create mode 100644
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.xml
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml
create mode 100644
tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-auto-socket-cfg.xml
delete mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.args
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.args
new file mode 100644
index 0000000..cfa63b1
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.args
@@ -0,0 +1,22 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-m 214 \
+-smp 1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c \
+-usb \
+-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
+-vnc unix:/tmp/lib/domain--1-QEMUGuest1/vnc.sock \
+-vga cirrus
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.xml
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.xml
new file mode 100644
index 0000000..fa59c39
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-auto-socket-cfg.xml
@@ -0,0 +1,34 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc'
socket='/tmp/lib/domain-99-QEMUGuest1/delete.this.socket'/>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'/>
+ </video>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args
deleted file mode 100644
index 7e1fb6b..0000000
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.args
+++ /dev/null
@@ -1,22 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu \
--name QEMUGuest1 \
--S \
--M pc \
--m 214 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nodefaults \
--monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--vnc unix:/tmp/lib/domain--1-QEMUGuest1/vnc.socket \
--vga cirrus
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml
b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml
deleted file mode 100644
index fa59c39..0000000
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-autosocket.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu</emulator>
- <disk type='block' device='disk'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'/>
- <controller type='ide' index='0'/>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <graphics type='vnc'
socket='/tmp/lib/domain-99-QEMUGuest1/delete.this.socket'/>
- <video>
- <model type='cirrus' vram='16384' heads='1'/>
- </video>
- <memballoon model='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 4bf5249..a3651c9 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -878,6 +878,9 @@ mymain(void)
DO_TEST("graphics-vnc-no-listen-attr", QEMU_CAPS_VNC);
DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC);
DO_TEST("graphics-vnc-auto-socket", QEMU_CAPS_VNC);
+ driver.config->vncAutoUnixSocket = true;
+ DO_TEST("graphics-vnc-auto-socket-cfg", QEMU_CAPS_VNC);
+ driver.config->vncAutoUnixSocket = false;
driver.config->vncSASL = 1;
VIR_FREE(driver.config->vncSASLdir);
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-auto-socket-cfg.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-auto-socket-cfg.xml
new file mode 100644
index 0000000..5013b18
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-auto-socket-cfg.xml
@@ -0,0 +1,41 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <graphics type='vnc'>
+ <listen type='socket'/>
+ </graphics>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='none'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml
deleted file mode 100644
index 5013b18..0000000
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-vnc-autosocket.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<domain type='qemu'>
- <name>QEMUGuest1</name>
- <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
- <memory unit='KiB'>219100</memory>
- <currentMemory unit='KiB'>219100</currentMemory>
- <vcpu placement='static'>1</vcpu>
- <os>
- <type arch='i686' machine='pc'>hvm</type>
- <boot dev='hd'/>
- </os>
- <clock offset='utc'/>
- <on_poweroff>destroy</on_poweroff>
- <on_reboot>restart</on_reboot>
- <on_crash>destroy</on_crash>
- <devices>
- <emulator>/usr/bin/qemu</emulator>
- <disk type='block' device='disk'>
- <driver name='qemu' type='raw'/>
- <source dev='/dev/HostVG/QEMUGuest1'/>
- <target dev='hda' bus='ide'/>
- <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
- </disk>
- <controller type='usb' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x2'/>
- </controller>
- <controller type='ide' index='0'>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
- </controller>
- <controller type='pci' index='0' model='pci-root'/>
- <input type='mouse' bus='ps2'/>
- <input type='keyboard' bus='ps2'/>
- <graphics type='vnc'>
- <listen type='socket'/>
- </graphics>
- <video>
- <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
- <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
- </video>
- <memballoon model='none'/>
- </devices>
-</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 172fbf9..49bf557 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -268,6 +268,8 @@ mymain(void)
if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
+ cfg = virQEMUDriverGetConfig(&driver);
+
/* TODO: test with format probing disabled too */
driver.config->allowDiskFormatProbing = true;
@@ -436,6 +438,10 @@ mymain(void)
DO_TEST("graphics-vnc-no-listen-attr");
DO_TEST("graphics-vnc-socket");
DO_TEST("graphics-vnc-auto-socket");
+ cfg->vncAutoUnixSocket = true;
+ DO_TEST_FULL("graphics-vnc-auto-socket-cfg", WHEN_INACTIVE, NONE);
+ cfg->vncAutoUnixSocket = false;
+
DO_TEST("graphics-sdl");
DO_TEST("graphics-sdl-fullscreen");
DO_TEST("graphics-spice");
@@ -792,11 +798,6 @@ mymain(void)
DO_TEST("virtio-input");
DO_TEST("virtio-input-passthrough");
- cfg = virQEMUDriverGetConfig(&driver);
- cfg->vncAutoUnixSocket = true;
- DO_TEST_FULL("graphics-vnc-autosocket", WHEN_INACTIVE, NONE);
- cfg->vncAutoUnixSocket = false;
-
virObjectUnref(cfg);
qemuTestDriverFree(&driver);
--
2.8.2
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list