]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
S390: Testcases for virtio-scsi and virtio-rng
authorViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Thu, 14 Mar 2013 18:32:26 +0000 (19:32 +0100)
committerEric Blake <eblake@redhat.com>
Thu, 14 Mar 2013 21:53:20 +0000 (15:53 -0600)
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 <mihajlov@linux.vnet.ibm.com>
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args
new file mode 100644 (file)
index 0000000..1b2603e
--- /dev/null
@@ -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 (file)
index 0000000..4ccd1c2
--- /dev/null
@@ -0,0 +1,31 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory>219136</memory>
+  <currentMemory>219136</currentMemory>
+  <vcpu>1</vcpu>
+  <os>
+    <type arch='s390x' machine='s390-ccw'>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='vda' bus='virtio'/>
+    </disk>
+    <disk type='block' device='disk'>
+      <source dev='/dev/HostVG/QEMUGuest2'/>
+      <target dev='sda' bus='scsi'/>
+      <address type='drive' controller='0' bus='0' target='4' unit='0'/>
+    </disk>
+    <controller type='scsi' index='0' model='virtio-scsi'/>
+    <memballoon model='virtio'>
+      <address type='ccw' cssid='0xFe' ssid='0x0' devno='0xA'/>
+    </memballoon>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args
new file mode 100644 (file)
index 0000000..5f9cef5
--- /dev/null
@@ -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 (file)
index 0000000..aa2cc02
--- /dev/null
@@ -0,0 +1,30 @@
+<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>
+  <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'/>
+      <boot order='1'/>
+    </disk>
+    <console type='pty'>
+      <target type='virtio'/>
+    </console>
+    <memballoon model='virtio'>
+      <address type='ccw' cssid='0xfe' ssid='0' devno='0x000a'/>
+    </memballoon>
+    <rng model='virtio'>
+      <backend model='random'>/dev/hwrng</backend>
+    </rng>
+  </devices>
+</domain>
index baf7a4f8e0887dd11839eaa5eb275e8b7fadc7d8..c77b73f66f3d7b22474419269ebabeeaf749f8dc 100644 (file)
@@ -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);