Make them work again... The xml2xml had been working, but the xml2argv
were not working. Making the xml2argv work required a few adjustments to
the xml to update to more recent times.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
.../qemuxml2argv-encrypted-disk.args | 26 +++++++++-------------
.../qemuxml2argv-encrypted-disk.xml | 4 ++--
tests/qemuxml2argvtest.c | 2 ++
.../qemuxml2xmlout-encrypted-disk.xml | 4 ++--
4 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args
b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args
index 206632c..4371413 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.args
@@ -1,28 +1,24 @@
LC_ALL=C \
-PATH=/sbin:/usr/sbin:/bin:/usr/bin \
-HOME=/root \
-USER=root \
-LOGNAME=root \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
/usr/bin/qemu \
-name encryptdisk \
-S \
--M pc-0.13 \
+-M pc \
-m 1024 \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
+-smp 1 \
-uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 \
-nographic \
--nodefconfig \
-nodefaults \
--chardev socket,id=monitor,path=//var/lib/libvirt/qemu/encryptdisk.monitor,\
-server,nowait \
--mon chardev=monitor,mode=readline \
--rtc base=utc \
+-monitor unix:/tmp/lib/domain--1-encryptdisk/monitor.sock,server,nowait \
-no-acpi \
-boot c \
-usb \
--drive file=/storage/guest_disks/encryptdisk,format=raw,if=none,\
-id=drive-virtio-disk0,\,boot=on \
--device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
+-drive file=/storage/guest_disks/encryptdisk,format=qcow2,if=none,\
+id=drive-virtio-disk0 \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,\
id=virtio-disk0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
index 6de570a..f2122f0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
@@ -1,11 +1,11 @@
-<domain type='kvm'>
+<domain type='qemu'>
<name>encryptdisk</name>
<uuid>496898a6-e6ff-f7c8-5dc2-3cf410945ee9</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
- <type arch='i686' machine='pc-0.13'>hvm</type>
+ <type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index f009d09..f827d1a 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1322,6 +1322,8 @@ mymain(void)
DO_TEST("cpu-Haswell-noTSX", QEMU_CAPS_KVM);
driver.caps->host.cpu = cpuDefault;
+ DO_TEST("encrypted-disk", NONE);
+
DO_TEST("memtune", NONE);
DO_TEST("memtune-unlimited", NONE);
DO_TEST("blkiotune", NONE);
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-encrypted-disk.xml
b/tests/qemuxml2xmloutdata/qemuxml2xmlout-encrypted-disk.xml
index 038a0e7..1616d2e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-encrypted-disk.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-encrypted-disk.xml
@@ -1,11 +1,11 @@
-<domain type='kvm'>
+<domain type='qemu'>
<name>encryptdisk</name>
<uuid>496898a6-e6ff-f7c8-5dc2-3cf410945ee9</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
- <type arch='i686' machine='pc-0.13'>hvm</type>
+ <type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
--
2.5.5