[libvirt] [PATCHv5 8/9] tests: add tests for multiple panic devices

Dmitry Andreev dandreev at virtuozzo.com
Tue Nov 24 12:26:37 UTC 2015


---
 .../qemuxml2argv-panic-double.args                 | 21 ++++++++++++++++
 .../qemuxml2argvdata/qemuxml2argv-panic-double.xml | 28 ++++++++++++++++++++++
 tests/qemuxml2argvtest.c                           |  2 ++
 tests/qemuxml2xmltest.c                            |  1 +
 4 files changed, 52 insertions(+)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-panic-double.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-panic-double.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-panic-double.args b/tests/qemuxml2argvdata/qemuxml2argv-panic-double.args
new file mode 100644
index 0000000..0d3a385
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-panic-double.args
@@ -0,0 +1,21 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu \
+-name QEMUGuest1 \
+-S \
+-M pc \
+-cpu qemu32,hv_crash \
+-m 214 \
+-smp 6 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefconfig \
+-nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-boot n \
+-usb \
+-device pvpanic,ioport=1285
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-panic-double.xml b/tests/qemuxml2argvdata/qemuxml2argv-panic-double.xml
new file mode 100644
index 0000000..aadb758
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-panic-double.xml
@@ -0,0 +1,28 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219100</memory>
+  <currentMemory unit='KiB'>219100</currentMemory>
+  <vcpu placement='static'>6</vcpu>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='network'/>
+  </os>
+  <features>
+    <acpi/>
+  </features>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <memballoon model='none'/>
+    <panic model='hyperv'/>
+    <panic model='isa'>
+      <address type='isa' iobase='0x505'/>
+    </panic>
+  </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a15305d..ea16c98 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1633,6 +1633,8 @@ mymain(void)
 
     DO_TEST("panic", QEMU_CAPS_DEVICE_PANIC,
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
+    DO_TEST("panic-double", QEMU_CAPS_DEVICE_PANIC,
+            QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
 
     DO_TEST("panic-no-address", QEMU_CAPS_DEVICE_PANIC,
             QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 0e43ee9..fd58331 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -594,6 +594,7 @@ mymain(void)
     DO_TEST_DIFFERENT("panic");
     DO_TEST("panic-isa");
     DO_TEST("panic-pseries");
+    DO_TEST("panic-double");
     DO_TEST("panic-no-address");
 
     DO_TEST_DIFFERENT("disk-backing-chains");
-- 
1.8.3.1




More information about the libvir-list mailing list