mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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 <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
4c1d1497e2
commit
53187afd81
@ -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
|
31
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml
Normal file
31
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml
Normal file
@ -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>
|
12
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args
Normal file
12
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args
Normal file
@ -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
|
30
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml
Normal file
30
tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml
Normal file
@ -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>
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user