Add qemu command line tests for virtio-crypto ccw support.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
---
.../qemuxml2argv-virtio-crypto-ccw.args | 22 ++++++++++++++++++++++
.../qemuxml2argv-virtio-crypto-ccw.xml | 16 ++++++++++++++++
tests/qemuxml2argvtest.c | 6 ++++++
3 files changed, 44 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.xml
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.args
b/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.args
new file mode 100644
index 0000000..1a59a2d
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.args
@@ -0,0 +1,22 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-s390x \
+-name QEMUGuest1 \
+-S \
+-M s390-ccw \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefconfig \
+-nodefaults \
+-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
+server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=readline \
+-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0000 \
+-object cryptodev-backend-builtin,id=objcrypto0,queues=1 \
+-device virtio-crypto-ccw,cryptodev=objcrypto0,id=crypto0,devno=fe.0.0001
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.xml
b/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.xml
new file mode 100644
index 0000000..b8d07ff
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-crypto-ccw.xml
@@ -0,0 +1,16 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory>219100</memory>
+ <currentMemory>219100</currentMemory>
+ <os>
+ <type arch='s390x' machine='s390-ccw'>hvm</type>
+ </os>
+ <devices>
+ <emulator>/usr/bin/qemu-system-s390x</emulator>
+ <memballoon model='virtio'/>
+ <crypto model='virtio'>
+ <backend type='builtin' queues='1'/>
+ </crypto>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 27eea70..70f85cd 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1781,6 +1781,12 @@ mymain(void)
QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_VIRTIO_RNG,
QEMU_CAPS_OBJECT_RNG_RANDOM);
+ DO_TEST("virtio-crypto-ccw",
+ QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
+ QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_CCW,
+ QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_VIRTIO_CRYPTO,
+ QEMU_CAPS_OBJECT_CRYPTO_BUILTIN);
+
DO_TEST("s390-allow-bogus-usb-none",
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390,
--
2.7.4