mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
tests: add tests for panic device model s390
Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
parent
73e4e10e62
commit
383c6f7f4d
26
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml
Normal file
26
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<os>
|
||||
<type arch='s390x' machine='s390-ccw-virtio'>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-system-s390x</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio'/>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||
</console>
|
||||
<panic model='s390'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0005'/>
|
||||
</panic>
|
||||
</devices>
|
||||
</domain>
|
25
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args
Normal file
25
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args
Normal file
@ -0,0 +1,25 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-s390x \
|
||||
-name QEMUGuest1 \
|
||||
-S \
|
||||
-M s390-ccw-virtio \
|
||||
-m 256 \
|
||||
-smp 1 \
|
||||
-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
|
||||
-nographic \
|
||||
-nodefconfig \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
|
||||
server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0000 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0 \
|
||||
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0002
|
23
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml
Normal file
23
tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<os>
|
||||
<type arch='s390x' machine='s390-ccw-virtio'>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-system-s390x</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio'/>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||
</console>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1,25 @@
|
||||
LC_ALL=C \
|
||||
PATH=/bin \
|
||||
HOME=/home/test \
|
||||
USER=test \
|
||||
LOGNAME=test \
|
||||
QEMU_AUDIO_DRV=none \
|
||||
/usr/bin/qemu-system-s390x \
|
||||
-name QEMUGuest1 \
|
||||
-S \
|
||||
-M s390-ccw-virtio \
|
||||
-m 256 \
|
||||
-smp 1 \
|
||||
-uuid 9aa4b45c-b9dd-45ef-91fe-862b27b4231f \
|
||||
-nographic \
|
||||
-nodefconfig \
|
||||
-nodefaults \
|
||||
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
|
||||
server,nowait \
|
||||
-mon chardev=charmonitor,id=monitor,mode=readline \
|
||||
-no-acpi \
|
||||
-boot c \
|
||||
-device virtio-serial-ccw,id=virtio-serial0,devno=fe.0.0000 \
|
||||
-chardev pty,id=charconsole0 \
|
||||
-device virtconsole,chardev=charconsole0,id=console0 \
|
||||
-device virtio-balloon-ccw,id=balloon0,devno=fe.0.0001
|
@ -0,0 +1,22 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<os>
|
||||
<type arch='s390x' machine='s390-ccw-virtio'>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-system-s390x</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio'/>
|
||||
</console>
|
||||
<panic/>
|
||||
</devices>
|
||||
</domain>
|
22
tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml
Normal file
22
tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='kvm'>
|
||||
<name>test</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory>262144</memory>
|
||||
<currentMemory>262144</currentMemory>
|
||||
<os>
|
||||
<type arch='s390x' machine='s390-ccw-virtio'>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-kvm</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio'/>
|
||||
</console>
|
||||
<panic/>
|
||||
</devices>
|
||||
</domain>
|
@ -1461,12 +1461,21 @@ mymain(void)
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390,
|
||||
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
||||
|
||||
DO_TEST("s390-allow-bogus-usb-controller",
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_BOOTINDEX, QEMU_CAPS_VIRTIO_S390,
|
||||
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
|
||||
|
||||
DO_TEST("s390-panic-no-address",
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST_FAILURE("s390-panic-address",
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST("s390-panic-missing",
|
||||
QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
|
||||
DO_TEST("ppc-dtb", QEMU_CAPS_KVM, QEMU_CAPS_DTB);
|
||||
DO_TEST("ppce500-serial", QEMU_CAPS_KVM, QEMU_CAPS_CHARDEV);
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory unit='KiB'>262144</memory>
|
||||
<currentMemory unit='KiB'>262144</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-system-s390x</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||
</console>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
|
||||
</memballoon>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
</domain>
|
@ -0,0 +1,28 @@
|
||||
<domain type='qemu'>
|
||||
<name>QEMUGuest1</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory unit='KiB'>262144</memory>
|
||||
<currentMemory unit='KiB'>262144</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-system-s390x</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
</console>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||
</memballoon>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
</domain>
|
28
tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml
Normal file
28
tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<domain type='kvm'>
|
||||
<name>test</name>
|
||||
<uuid>9aa4b45c-b9dd-45ef-91fe-862b27b4231f</uuid>
|
||||
<memory unit='KiB'>262144</memory>
|
||||
<currentMemory unit='KiB'>262144</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-kvm</emulator>
|
||||
<controller type='virtio-serial' index='0'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||
</controller>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
</console>
|
||||
<memballoon model='virtio'>
|
||||
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||
</memballoon>
|
||||
<panic model='s390'/>
|
||||
</devices>
|
||||
</domain>
|
@ -699,6 +699,12 @@ mymain(void)
|
||||
|
||||
DO_TEST_FULL("s390-defaultconsole", WHEN_ACTIVE,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST_FULL("s390-panic", WHEN_BOTH,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST_FULL("s390-panic-missing", WHEN_BOTH,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
DO_TEST_FULL("s390-panic-no-address", WHEN_BOTH,
|
||||
QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
|
||||
|
||||
DO_TEST("pcihole64");
|
||||
DO_TEST("pcihole64-gib");
|
||||
|
Loading…
Reference in New Issue
Block a user