diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml
new file mode 100644
index 0000000000000000000000000000000000000000..94521d080cb7eb544b7ad364bf192a58a034057e
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-address.xml
@@ -0,0 +1,26 @@
+
+ QEMUGuest1
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+
+ hvm
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-s390x
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args
new file mode 100644
index 0000000000000000000000000000000000000000..f2eec5bb0e644a555bff218779ad247f01256d32
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.args
@@ -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
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml
new file mode 100644
index 0000000000000000000000000000000000000000..89554330a8693b68a7b7f51465a15f1b0caaac77
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-missing.xml
@@ -0,0 +1,23 @@
+
+ QEMUGuest1
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+
+ hvm
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-s390x
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args
new file mode 100644
index 0000000000000000000000000000000000000000..811991d9c801c01c2c0afdd1f603c60fc57dec17
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.args
@@ -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
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b698d27b4d1d9c0110ec4652a91e3893f091522a
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic-no-address.xml
@@ -0,0 +1,22 @@
+
+ QEMUGuest1
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+
+ hvm
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-s390x
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml
new file mode 100644
index 0000000000000000000000000000000000000000..432a04c404d5ec70a974111c103565444d9bfd70
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-s390-panic.xml
@@ -0,0 +1,22 @@
+
+ test
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+
+ hvm
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-kvm
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 8842b2fb268ef78ab600ef36db39f119da581191..1d13c055db44c47627ce14adbc67e6d439f021f8 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -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);
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-missing.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-missing.xml
new file mode 100644
index 0000000000000000000000000000000000000000..886415725fa346106cb57e977db7b03f38a38ef9
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-missing.xml
@@ -0,0 +1,29 @@
+
+ QEMUGuest1
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-s390x
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-no-address.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-no-address.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3ae36ba675b019fccfb77898ec73ec478eb6da2a
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic-no-address.xml
@@ -0,0 +1,28 @@
+
+ QEMUGuest1
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-system-s390x
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml
new file mode 100644
index 0000000000000000000000000000000000000000..12fc6874972c9b57263f3968c1327080f89663ea
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-panic.xml
@@ -0,0 +1,28 @@
+
+ test
+ 9aa4b45c-b9dd-45ef-91fe-862b27b4231f
+ 262144
+ 262144
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu-kvm
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 62f8f96c22741ce4ed909b6fd3387f91bf5c50ec..a68bd25c46cc2f816dbbf7d5da62d7e778f5ef22 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -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");