From 53187afd813aae6250f88e9ec44e0f22dff40e3c Mon Sep 17 00:00:00 2001 From: Viktor Mihajlovski Date: Thu, 14 Mar 2013 19:32:26 +0100 Subject: [PATCH] S390: Testcases for virtio-scsi and virtio-rng Adding test cases for virtio-scsi and virtio-rng. Since ccw is covering the superset of the s390 bus handling, these are deemed to be sufficient. Signed-off-by: Viktor Mihajlovski --- .../qemuxml2argv-disk-virtio-scsi-ccw.args | 9 ++++++ .../qemuxml2argv-disk-virtio-scsi-ccw.xml | 31 +++++++++++++++++++ .../qemuxml2argv-virtio-rng-ccw.args | 12 +++++++ .../qemuxml2argv-virtio-rng-ccw.xml | 30 ++++++++++++++++++ tests/qemuxml2argvtest.c | 7 +++++ 5 files changed, 89 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args new file mode 100644 index 0000000000..1b2603e752 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args @@ -0,0 +1,9 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S \ +-M s390-ccw -m 214 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \ +-device virtio-scsi-ccw,id=scsi0,devno=fe.0.0001 \ +-usb -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 \ +-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-scsi0-0-4-0 \ +-device scsi-disk,bus=scsi0.0,channel=0,scsi-id=4,lun=0,drive=drive-scsi0-0-4-0,id=scsi0-0-4-0 \ +-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml new file mode 100644 index 0000000000..4ccd1c2b9d --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml @@ -0,0 +1,31 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + +
+ + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args new file mode 100644 index 0000000000..5f9cef5471 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args @@ -0,0 +1,12 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \ +s390-ccw -m 214 -smp 1 -nographic -nodefconfig -nodefaults -chardev \ +socket,id=charmonitor,path=/tmp/test-monitor,server,nowait -mon \ +chardev=charmonitor,id=monitor,mode=readline -no-acpi \ +-device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0001 \ +-usb -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,bootindex=1 \ +-chardev pty,id=charconsole0 \ +-device virtconsole,chardev=charconsole0,id=console0 \ +-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a \ +-object rng-random,id=rng0,filename=/dev/hwrng \ +-device virtio-rng-ccw,rng=rng0,devno=fe.0.0002 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml new file mode 100644 index 0000000000..aa2cc02ec8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + + hvm + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + + + +
+ + + /dev/hwrng + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index baf7a4f8e0..c77b73f66f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -444,6 +444,8 @@ mymain(void) QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-virtio-ccw-many", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); + DO_TEST("disk-virtio-scsi-ccw", QEMU_CAPS_DRIVE, QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390); DO_TEST("disk-order", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE_BOOT, QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO); @@ -900,6 +902,11 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST("virtio-rng-egd", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_EGD); + DO_TEST("virtio-rng-ccw", + QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_DRIVE, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_CCW, + QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_RANDOM); virObjectUnref(driver.config); virObjectUnref(driver.caps);