tests: add tests for panic device model s390

Signed-off-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
This commit is contained in:
Boris Fiuczynski 2016-04-29 15:23:43 +02:00 committed by Andrea Bolognani
parent 73e4e10e62
commit 383c6f7f4d
11 changed files with 244 additions and 1 deletions

View 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>

View 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

View 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>

View 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.0001

View File

@ -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>

View 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>

View File

@ -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);

View File

@ -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>

View File

@ -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>

View 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>

View File

@ -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");