]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2xmltest: Modernize 'mach-virt*' cases
authorPeter Krempa <pkrempa@redhat.com>
Fri, 24 Mar 2023 15:40:53 +0000 (16:40 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 11 Apr 2023 08:08:32 +0000 (10:08 +0200)
Use real capabilities.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2xmloutdata/mach-virt-console-native.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-console-native.xml with 84% similarity]
tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml with 52% similarity]
tests/qemuxml2xmloutdata/mach-virt-serial+console-native.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-serial-native.xml with 84% similarity]
tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml with 84% similarity]
tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-serial-compat.xml with 84% similarity]
tests/qemuxml2xmloutdata/mach-virt-serial-pci.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-serial-pci.xml with 71% similarity]
tests/qemuxml2xmloutdata/mach-virt-serial-usb.aarch64-latest.xml [moved from tests/qemuxml2xmloutdata/mach-virt-serial-usb.xml with 93% similarity]
tests/qemuxml2xmltest.c

similarity index 84%
rename from tests/qemuxml2xmloutdata/mach-virt-console-native.xml
rename to tests/qemuxml2xmloutdata/mach-virt-console-native.aarch64-latest.xml
index f66fe2916a96bbe919725c0bc00c95780c0f070a..66da5927e301ff8c90dab0e24f909db9a7a1cf1f 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -18,6 +21,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
     <serial type='pty'>
       <target type='system-serial' port='0'>
         <model name='pl011'/>
similarity index 52%
rename from tests/qemuxml2xmloutdata/mach-virt-console-virtio.xml
rename to tests/qemuxml2xmloutdata/mach-virt-console-virtio.aarch64-latest.xml
index 6224089879b78a6397aba7634c2d1c867d65ca65..e1ff62f2c5af14cae89bf999d5e781f218e65516 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
     <controller type='virtio-serial' index='0'>
-      <address type='virtio-mmio'/>
+      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+    </controller>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+    </controller>
+    <controller type='pci' index='2' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='2' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <console type='pty'>
       <target type='virtio' port='0'/>
similarity index 84%
rename from tests/qemuxml2xmloutdata/mach-virt-serial-native.xml
rename to tests/qemuxml2xmloutdata/mach-virt-serial+console-native.aarch64-latest.xml
index f66fe2916a96bbe919725c0bc00c95780c0f070a..66da5927e301ff8c90dab0e24f909db9a7a1cf1f 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -18,6 +21,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
     <serial type='pty'>
       <target type='system-serial' port='0'>
         <model name='pl011'/>
similarity index 84%
rename from tests/qemuxml2xmloutdata/mach-virt-serial+console-native.xml
rename to tests/qemuxml2xmloutdata/mach-virt-serial-compat.aarch64-latest.xml
index f66fe2916a96bbe919725c0bc00c95780c0f070a..66da5927e301ff8c90dab0e24f909db9a7a1cf1f 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -18,6 +21,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
     <serial type='pty'>
       <target type='system-serial' port='0'>
         <model name='pl011'/>
similarity index 84%
rename from tests/qemuxml2xmloutdata/mach-virt-serial-compat.xml
rename to tests/qemuxml2xmloutdata/mach-virt-serial-native.aarch64-latest.xml
index f66fe2916a96bbe919725c0bc00c95780c0f070a..66da5927e301ff8c90dab0e24f909db9a7a1cf1f 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -18,6 +21,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
+    <controller type='pci' index='0' model='pcie-root'/>
     <serial type='pty'>
       <target type='system-serial' port='0'>
         <model name='pl011'/>
similarity index 71%
rename from tests/qemuxml2xmloutdata/mach-virt-serial-pci.xml
rename to tests/qemuxml2xmloutdata/mach-virt-serial-pci.aarch64-latest.xml
index 09478419e22683dbc970d0b7dd4e580833778ca1..abf8407a72b0a52d2b852bac19e91a1d7377096d 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
     <emulator>/usr/bin/qemu-system-aarch64</emulator>
     <controller type='usb' index='0' model='none'/>
     <controller type='pci' index='0' model='pcie-root'/>
-    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
-      <model name='i82801b11-bridge'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    <controller type='pci' index='1' model='pcie-root-port'>
+      <model name='pcie-root-port'/>
+      <target chassis='1' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
     </controller>
-    <controller type='pci' index='2' model='pci-bridge'>
-      <model name='pci-bridge'/>
-      <target chassisNr='2'/>
+    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+      <model name='pcie-pci-bridge'/>
       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
     </controller>
     <controller type='pci' index='3' model='pcie-root-port'>
       <model name='pcie-root-port'/>
-      <target chassis='3' port='0x10'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+      <target chassis='3' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <serial type='pty'>
       <target type='pci-serial' port='0'>
similarity index 93%
rename from tests/qemuxml2xmloutdata/mach-virt-serial-usb.xml
rename to tests/qemuxml2xmloutdata/mach-virt-serial-usb.aarch64-latest.xml
index 0578d7ad72410426e78f4626c22b42e0cfd44dbe..9afbeee12dbd72c0ceb8bbe93233db3631d311bf 100644 (file)
@@ -11,6 +11,9 @@
   <features>
     <gic version='2'/>
   </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>cortex-a15</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
index 61474ecb0dadb455b7eb8cdb999374f92ccdf451..64edd26fafca937e4733a047284e8cdc4c65c1e2 100644 (file)
@@ -643,24 +643,13 @@ mymain(void)
     DO_TEST_CAPS_ARCH_LATEST("pseries-console-native", "ppc64");
     DO_TEST_CAPS_ARCH_LATEST("pseries-console-virtio", "ppc64");
 
-    DO_TEST_NOCAPS("mach-virt-serial-native");
-    DO_TEST_NOCAPS("mach-virt-serial+console-native");
-    DO_TEST_NOCAPS("mach-virt-serial-compat");
-    DO_TEST("mach-virt-serial-pci",
-            QEMU_CAPS_OBJECT_GPEX,
-            QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
-            QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
-            QEMU_CAPS_DEVICE_PCI_BRIDGE,
-            QEMU_CAPS_DEVICE_PCI_SERIAL);
-    DO_TEST("mach-virt-serial-usb",
-            QEMU_CAPS_OBJECT_GPEX,
-            QEMU_CAPS_DEVICE_PCIE_ROOT_PORT,
-            QEMU_CAPS_DEVICE_QEMU_XHCI,
-            QEMU_CAPS_DEVICE_USB_SERIAL);
-    DO_TEST("mach-virt-console-native",
-            QEMU_CAPS_DEVICE_PL011);
-    DO_TEST("mach-virt-console-virtio",
-            QEMU_CAPS_DEVICE_VIRTIO_MMIO);
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-native", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial+console-native", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-compat", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-pci", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-serial-usb", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-native", "aarch64");
+    DO_TEST_CAPS_ARCH_LATEST("mach-virt-console-virtio", "aarch64");
 
     DO_TEST_NOCAPS("balloon-device-auto");
     DO_TEST_NOCAPS("balloon-device-period");