qemu: Test for virtio-9p-ccw support

This patch adds a test for the qemu command line generation.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Reviewed-by: Jason J. Herne <jjherne@us.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
This commit is contained in:
Boris Fiuczynski 2015-07-07 17:30:43 +02:00 committed by Ján Tomko
parent d01b7c7854
commit 35e3fb50ee
3 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,16 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu -S -M s390-ccw-virtio -m 214 -smp 1 \
-nographic -nodefconfig -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 -device \
virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk0,id=virtio-disk0 \
-fsdev local,security_model=passthrough,id=fsdev-fs0,\
path=/export/to/guest -device virtio-9p-ccw,id=fs0,fsdev=fsdev-fs0,\
mount_tag=/import/from/host,devno=fe.0.0001 \
-fsdev local,security_model=mapped,writeout=immediate,id=fsdev-fs1,\
path=/export/to/guest2 -device virtio-9p-ccw,id=fs1,fsdev=fsdev-fs1,\
mount_tag=/import/from/host2,devno=fe.0.0002 \
-fsdev handle,writeout=immediate,id=fsdev-fs2,\
path=/export/to/guest3 -device virtio-9p-ccw,id=fs2,fsdev=fsdev-fs2,\
mount_tag=/import/from/host3,devno=fe.0.0003 \
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0004

View File

@ -0,0 +1,36 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='s390x' machine='s390-ccw-virtio'>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'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='virtio'/>
</disk>
<filesystem type='mount'>
<source dir='/export/to/guest'/>
<target dir='/import/from/host'/>
</filesystem>
<filesystem accessmode='mapped'>
<driver type='path' wrpolicy='immediate'/>
<source dir='/export/to/guest2'/>
<target dir='/import/from/host2'/>
</filesystem>
<filesystem>
<driver type='handle' wrpolicy='immediate'/>
<source dir='/export/to/guest3'/>
<target dir='/import/from/host3'/>
</filesystem>
</devices>
</domain>

View File

@ -1231,6 +1231,10 @@ mymain(void)
DO_TEST("fs9p",
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_FSDEV,
QEMU_CAPS_FSDEV_WRITEOUT);
DO_TEST("fs9p-ccw",
QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_FSDEV,
QEMU_CAPS_FSDEV_WRITEOUT, QEMU_CAPS_DRIVE,
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
DO_TEST("hostdev-usb-address", NONE);
DO_TEST("hostdev-usb-address-device",