]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Test timer validation for non-x86 arches
authorSebastian Mitterle <smitterl@redhat.com>
Tue, 22 Sep 2020 11:57:40 +0000 (11:57 +0000)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 23 Sep 2020 20:48:26 +0000 (22:48 +0200)
Add minimal coverage for non-x86_64 timer validation
from commit 2f5d8ffebe5d3d00e16a051ed62ce8a703f18e7c

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tests/qemuxml2argvdata/non-x86_64-timer-error.err [new file with mode: 0644]
tests/qemuxml2argvdata/non-x86_64-timer-error.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c

diff --git a/tests/qemuxml2argvdata/non-x86_64-timer-error.err b/tests/qemuxml2argvdata/non-x86_64-timer-error.err
new file mode 100644 (file)
index 0000000..f46673e
--- /dev/null
@@ -0,0 +1 @@
+unsupported configuration: Configuring the 'tsc' timer is not supported for virtType=kvm arch=s390x machine=s390-ccw guests
diff --git a/tests/qemuxml2argvdata/non-x86_64-timer-error.xml b/tests/qemuxml2argvdata/non-x86_64-timer-error.xml
new file mode 100644 (file)
index 0000000..11559bb
--- /dev/null
@@ -0,0 +1,18 @@
+<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'>hvm</type>
+  </os>
+  <clock offset='utc'>
+    <timer name='tsc' present='yes'/>
+  </clock>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-s390x</emulator>
+  </devices>
+</domain>
index 639447e417796ac72b7996d31f2e7aeaf4d0539c..a3c91fd5de1208f8e1012ce570a6e22c48fe39e0 100644 (file)
@@ -1141,6 +1141,8 @@ mymain(void)
             QEMU_CAPS_DEVICE_ZPCI,
             QEMU_CAPS_CCW,
             QEMU_CAPS_VIRTIO_S390);
+    DO_TEST_PARSE_ERROR("non-x86_64-timer-error",
+                        QEMU_CAPS_VIRTIO_S390);
     DO_TEST("disk-order", QEMU_CAPS_VIRTIO_BLK_SCSI);
     DO_TEST("disk-virtio-queues",
             QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES);