]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: qemuxml2xml: Modernize 's390-defaultconsole' case
authorPeter Krempa <pkrempa@redhat.com>
Fri, 11 Jun 2021 08:21:57 +0000 (10:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 15 Jun 2021 14:58:22 +0000 (16:58 +0200)
Don't use the 's390-virtio' machine which was removed in qemu 2.6 and
use real capabilities for the test.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/s390-defaultconsole.xml
tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml [moved from tests/qemuxml2xmloutdata/s390-defaultconsole.xml with 82% similarity]
tests/qemuxml2xmltest.c

index b85509ba549670510e35192fea1819fcf7af29ac..0c64e8398317bc8c00df1a327b6c546e5c2cf389 100644 (file)
@@ -5,7 +5,7 @@
   <currentMemory unit='KiB'>262144</currentMemory>
   <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='s390x' machine='s390-virtio'>hvm</type>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
     <boot dev='hd'/>
   </os>
   <clock offset='utc'/>
similarity index 82%
rename from tests/qemuxml2xmloutdata/s390-defaultconsole.xml
rename to tests/qemuxml2xmloutdata/s390-defaultconsole.s390x-latest.xml
index d34299116c2637c8a40741c3a197813ae8be79ab..212b294291e197947e9d37454e23939181d606d9 100644 (file)
@@ -5,15 +5,17 @@
   <currentMemory unit='KiB'>262144</currentMemory>
   <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch='s390x' machine='s390-virtio'>hvm</type>
+    <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='host-model' check='partial'/>
   <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='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target type='sclp-serial' port='0'>
         <model name='sclpconsole'/>
index 8ba732d5667df64b7a24ee330867118d653e1410..3063e52c8f491e7cd270e3a0afca71a8999fe3ea 100644 (file)
@@ -1051,8 +1051,7 @@ mymain(void)
             QEMU_CAPS_CCW_CSSID_UNRESTRICTED,
             QEMU_CAPS_DEVICE_VFIO_AP);
 
-    DO_TEST("s390-defaultconsole",
-            QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
+    DO_TEST_CAPS_ARCH_LATEST("s390-defaultconsole", "s390x");
     DO_TEST("s390-panic",
             QEMU_CAPS_CCW, QEMU_CAPS_VIRTIO_S390);
     DO_TEST("s390-panic-missing",