mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
S390: Testcases for virtio-ccw machines
This adds and corrects testcases for virtio devices on s390 guests. Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
This commit is contained in:
parent
f946462e14
commit
3eefaccd47
10
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args
Normal file
10
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.args
Normal file
@ -0,0 +1,10 @@
|
||||
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
|
27
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.xml
Normal file
27
tests/qemuxml2argvdata/qemuxml2argv-console-virtio-ccw.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<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>
|
||||
</devices>
|
||||
</domain>
|
@ -2,8 +2,8 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
|
||||
s390-virtio -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 \
|
||||
-boot c -device virtio-serial-s390,id=virtio-serial0 \
|
||||
-device virtio-serial-s390,id=virtio-serial0 \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-device virtio-blk-s390,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0
|
||||
|
@ -5,7 +5,6 @@
|
||||
<currentMemory>219100</currentMemory>
|
||||
<os>
|
||||
<type arch='s390x' machine='s390-virtio'>hvm</type>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
@ -16,6 +15,7 @@
|
||||
<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'/>
|
||||
|
@ -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 -nodefaults \
|
||||
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c \
|
||||
-usb -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-virtio-disk0 \
|
||||
-device virtio-blk-ccw,devno=0.0.0007,drive=drive-virtio-disk0,id=virtio-disk0 \
|
||||
-drive file=/dev/HostVG/QEMUGuest4,if=none,id=drive-virtio-disk1 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0000,drive=drive-virtio-disk1,id=virtio-disk1 \
|
||||
-drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-virtio-disk2 \
|
||||
-device virtio-blk-ccw,devno=fe.0.0001,drive=drive-virtio-disk2,id=virtio-disk2 \
|
||||
-drive file=/dev/HostVG/QEMUGuest3,if=none,id=drive-virtio-disk3 \
|
||||
-device virtio-blk-ccw,devno=fe.2.f00f,drive=drive-virtio-disk3,id=virtio-disk3 \
|
||||
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a
|
40
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.xml
Normal file
40
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw-many.xml
Normal file
@ -0,0 +1,40 @@
|
||||
<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='hda' bus='virtio'/>
|
||||
<address type='ccw' cssid='0' ssid='0x0' devno='7'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest2'/>
|
||||
<target dev='hdc' bus='virtio'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest3'/>
|
||||
<target dev='hdd' bus='virtio'/>
|
||||
<address type='ccw' cssid='254' ssid='2' devno='0xf00f'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest4'/>
|
||||
<target dev='hdb' bus='virtio'/>
|
||||
<address type='ccw'/>
|
||||
</disk>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0a'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
</domain>
|
8
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args
Normal file
8
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.args
Normal file
@ -0,0 +1,8 @@
|
||||
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 \
|
||||
-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-virtio-disk1 \
|
||||
-device virtio-blk-ccw,devno=0.0.0007,drive=drive-virtio-disk1,id=virtio-disk1 \
|
||||
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a
|
30
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.xml
Normal file
30
tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-ccw.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<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='hda' bus='virtio'/>
|
||||
</disk>
|
||||
<disk type='block' device='disk'>
|
||||
<source dev='/dev/HostVG/QEMUGuest2'/>
|
||||
<target dev='hdb' bus='virtio'/>
|
||||
<address type='ccw' cssid='0' ssid='0' devno='7'/>
|
||||
</disk>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='0xFe' ssid='0x0' devno='0xA'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
</domain>
|
8
tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args
Normal file
8
tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.args
Normal file
@ -0,0 +1,8 @@
|
||||
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 \
|
||||
-usb -device virtio-net-ccw,vlan=0,id=net0,mac=00:11:22:33:44:55,devno=fe.0.0001 \
|
||||
-net user,vlan=0,name=hostnet0 \
|
||||
-device virtio-net-ccw,vlan=1,id=net1,mac=00:11:22:33:44:54,devno=fe.0.0000 \
|
||||
-net user,vlan=1,name=hostnet1 \
|
||||
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.000a
|
30
tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.xml
Normal file
30
tests/qemuxml2argvdata/qemuxml2argv-net-virtio-ccw.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<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>
|
||||
<interface type='user'>
|
||||
<mac address='00:11:22:33:44:55'/>
|
||||
<model type='virtio'/>
|
||||
</interface>
|
||||
<interface type='user'>
|
||||
<mac address='00:11:22:33:44:54'/>
|
||||
<model type='virtio'/>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0'/>
|
||||
</interface>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='254' ssid='0' devno='10'/>
|
||||
</memballoon>
|
||||
</devices>
|
||||
</domain>
|
@ -440,6 +440,10 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("disk-many", NONE);
|
||||
DO_TEST("disk-virtio", QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_BOOT);
|
||||
DO_TEST("disk-virtio-ccw", QEMU_CAPS_DRIVE,
|
||||
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-order",
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE_BOOT,
|
||||
QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO);
|
||||
@ -627,6 +631,8 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_NETDEV, QEMU_CAPS_NODEFCONFIG);
|
||||
DO_TEST("net-virtio-s390",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("net-virtio-ccw",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("net-eth", NONE);
|
||||
DO_TEST("net-eth-ifname", NONE);
|
||||
DO_TEST("net-eth-names", QEMU_CAPS_NET_NAME);
|
||||
@ -686,7 +692,11 @@ mymain(void)
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG);
|
||||
DO_TEST("console-virtio-s390",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_VIRTIO_S390);
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("console-virtio-ccw",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_CCW,
|
||||
QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("console-sclp",
|
||||
QEMU_CAPS_DEVICE, QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_DRIVE, QEMU_CAPS_VIRTIO_S390, QEMU_CAPS_SCLP_S390);
|
||||
|
@ -94,7 +94,8 @@ error:
|
||||
|
||||
static int testQemuAddS390Guest(virCapsPtr caps)
|
||||
{
|
||||
static const char *s390_machines[] = { "s390-virtio"};
|
||||
static const char *s390_machines[] = { "s390-virtio",
|
||||
"s390-ccw-virtio" };
|
||||
virCapsGuestMachinePtr *machines = NULL;
|
||||
virCapsGuestPtr guest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user