[libvirt] [PATCH 2/4] tests: qemuxml2argv: Make use of 'vram64' QXL device tests

Peter Krempa pkrempa at redhat.com
Mon Aug 27 16:09:07 UTC 2018


The test files were unused, but we don't have any other test for this
feature. Make use of the existing files by removing disks and using
DO_TEST_CAPS_LATEST to execute them. The legacy output files will be
dropped.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 .../qemuxml2argvdata/video-qxl-device-vram64.args  | 25 ----------------
 .../video-qxl-device-vram64.x86_64-latest.args     | 32 ++++++++++++++++++++
 tests/qemuxml2argvdata/video-qxl-device-vram64.xml |  6 ----
 .../video-qxl-sec-device-vram64.args               | 27 -----------------
 .../video-qxl-sec-device-vram64.x86_64-latest.args | 34 ++++++++++++++++++++++
 .../video-qxl-sec-device-vram64.xml                |  6 ----
 tests/qemuxml2argvtest.c                           |  2 ++
 7 files changed, 68 insertions(+), 64 deletions(-)
 delete mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.args
 create mode 100644 tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
 delete mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args
 create mode 100644 tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args

diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.args b/tests/qemuxml2argvdata/video-qxl-device-vram64.args
deleted file mode 100644
index b9e65ea873..0000000000
--- a/tests/qemuxml2argvdata/video-qxl-device-vram64.args
+++ /dev/null
@@ -1,25 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-x86_64 \
--name QEMUGuest1 \
--S \
--M pc \
--m 1024 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--nodefaults \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
-id=drive-ide0-0-0,cache=none \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\
-vram64_size_mb=128,vgamem_mb=16,bus=pci.0,addr=0x2 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
new file mode 100644
index 0000000000..913b5d45bc
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-qxl-device-vram64.x86_64-latest.args
@@ -0,0 +1,32 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-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 1024 \
+-realtime mlock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-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 \
+-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\
+vram64_size_mb=128,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/video-qxl-device-vram64.xml b/tests/qemuxml2argvdata/video-qxl-device-vram64.xml
index 1e89d06a75..2b88c9d078 100644
--- a/tests/qemuxml2argvdata/video-qxl-device-vram64.xml
+++ b/tests/qemuxml2argvdata/video-qxl-device-vram64.xml
@@ -14,12 +14,6 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2' cache='none'/>
-      <source file='/var/lib/libvirt/images/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
     <controller type='ide' index='0'/>
     <video>
       <model type='qxl' vram64='131072' heads='1'/>
diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args
deleted file mode 100644
index 4a152c97bf..0000000000
--- a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.args
+++ /dev/null
@@ -1,27 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-i686 \
--name QEMUGuest1 \
--S \
--M pc \
--m 1024 \
--smp 1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--nodefaults \
--monitor unix:/tmp/test-monitor,server,nowait \
--no-acpi \
--boot c \
--usb \
--drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
-id=drive-ide0-0-0,cache=none \
--device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
--device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,\
-bus=pci.0,addr=0x2 \
--device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=128,\
-vgamem_mb=16,bus=pci.0,addr=0x4 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args
new file mode 100644
index 0000000000..e7c993c907
--- /dev/null
+++ b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.x86_64-latest.args
@@ -0,0 +1,34 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+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 1024 \
+-realtime mlock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-display none \
+-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 \
+-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,\
+vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 \
+-device qxl,id=video1,ram_size=67108864,vram_size=67108864,vram64_size_mb=128,\
+vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x4 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml
index c71f59731d..6bd0909c59 100644
--- a/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml
+++ b/tests/qemuxml2argvdata/video-qxl-sec-device-vram64.xml
@@ -14,12 +14,6 @@
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-i686</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='qcow2' cache='none'/>
-      <source file='/var/lib/libvirt/images/QEMUGuest1'/>
-      <target dev='hda' bus='ide'/>
-      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
-    </disk>
     <controller type='ide' index='0'/>
     <video>
       <model type='qxl' heads='1'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 82b5b7bbea..16c3540798 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2007,12 +2007,14 @@ mymain(void)
             QEMU_CAPS_DEVICE_QXL,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_QXL_VGAMEM);
+    DO_TEST_CAPS_LATEST("video-qxl-device-vram64");
     DO_TEST("video-qxl-sec-device",
             QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
     DO_TEST("video-qxl-sec-device-vgamem",
             QEMU_CAPS_DEVICE_QXL,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_QXL_VGAMEM);
+    DO_TEST_CAPS_LATEST("video-qxl-sec-device-vram64");
     DO_TEST("video-qxl-heads",
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_QXL,
-- 
2.16.2




More information about the libvir-list mailing list