]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2xmltest: Modernize all 'video-*' cases
authorPeter Krempa <pkrempa@redhat.com>
Wed, 16 Aug 2023 12:52:34 +0000 (14:52 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Aug 2023 12:04:41 +0000 (14:04 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
12 files changed:
tests/qemuxml2argvdata/video-qxl-resolution.xml
tests/qemuxml2xmloutdata/video-device-pciaddr-default.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-device-pciaddr-default.xml with 92% similarity]
tests/qemuxml2xmloutdata/video-none-device.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-none-device.xml with 90% similarity]
tests/qemuxml2xmloutdata/video-qxl-heads.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-qxl-heads.xml with 92% similarity]
tests/qemuxml2xmloutdata/video-qxl-noheads.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-qxl-noheads.xml with 90% similarity]
tests/qemuxml2xmloutdata/video-qxl-resolution.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-qxl-resolution.xml with 100% similarity]
tests/qemuxml2xmloutdata/video-virtio-gpu-device.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-virtio-gpu-device.xml with 90% similarity]
tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml with 90% similarity]
tests/qemuxml2xmloutdata/video-virtio-gpu-secondary.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-virtio-gpu-secondary.xml with 88% similarity]
tests/qemuxml2xmloutdata/video-virtio-gpu-spice-gl.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-virtio-gpu-spice-gl.xml with 91% similarity]
tests/qemuxml2xmloutdata/video-virtio-gpu-virgl.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/video-virtio-gpu-virgl.xml with 90% similarity]
tests/qemuxml2xmltest.c

index 5715f9daa41c924bb771cae4b73d537f3d37e57e..f0f8f76a99662f821d5628015d7ae7d18d0682b9 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
similarity index 92%
rename from tests/qemuxml2xmloutdata/video-device-pciaddr-default.xml
rename to tests/qemuxml2xmloutdata/video-device-pciaddr-default.x86_64-latest.xml
index 431661e29def9229253ff54842a034b6a02d77c7..1d71995af0b53bce3585275fe861bc5deb355e7f 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
similarity index 90%
rename from tests/qemuxml2xmloutdata/video-none-device.xml
rename to tests/qemuxml2xmloutdata/video-none-device.x86_64-latest.xml
index 1c6c417bc86cbf8436b7168ae5e4d08aecd812d7..e39c617b91f9c6a8293530b21b32701987faec53 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
similarity index 92%
rename from tests/qemuxml2xmloutdata/video-qxl-heads.xml
rename to tests/qemuxml2xmloutdata/video-qxl-heads.x86_64-latest.xml
index 9a8e1fca0bdac10f3c2ac8920708540c2ba8db13..6d93ba1330843c6dd09b17d421bc11d40e95aed1 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
similarity index 90%
rename from tests/qemuxml2xmloutdata/video-qxl-noheads.xml
rename to tests/qemuxml2xmloutdata/video-qxl-noheads.x86_64-latest.xml
index 6243e290752c12b97fa667377ab06ad41b311fa0..39d2f8342265c535b8e81212ab0c7ffbe9acdff8 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -20,7 +23,7 @@
       <target dev='hda' bus='ide'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ide' index='0'>
similarity index 90%
rename from tests/qemuxml2xmloutdata/video-virtio-gpu-device.xml
rename to tests/qemuxml2xmloutdata/video-virtio-gpu-device.x86_64-latest.xml
index c1fc9c7f677a3e640fcfb178910fb1bf7c1b0692..0c31cfb927b9df6452fbc697e290fc38e50dedf9 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -23,7 +26,7 @@
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
similarity index 90%
rename from tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.xml
rename to tests/qemuxml2xmloutdata/video-virtio-gpu-sdl-gl.x86_64-latest.xml
index 5a233f527cd2282c81d1b2e781ca61fb4b30599c..401fdaf6972521c5de64e24ec943bcc7821c9eea 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -23,7 +26,7 @@
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
similarity index 88%
rename from tests/qemuxml2xmloutdata/video-virtio-gpu-secondary.xml
rename to tests/qemuxml2xmloutdata/video-virtio-gpu-secondary.x86_64-latest.xml
index 413296a925cd6c82a42bed918e11f0347826960a..7eae993cc07b7b31d5f5b33edc36aee67ce341e2 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -15,7 +18,7 @@
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
     <controller type='pci' index='0' model='pci-root'/>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <input type='mouse' bus='ps2'/>
similarity index 91%
rename from tests/qemuxml2xmloutdata/video-virtio-gpu-spice-gl.xml
rename to tests/qemuxml2xmloutdata/video-virtio-gpu-spice-gl.x86_64-latest.xml
index 411462bebf09861bb99260abbee406c7925ac622..89da83de01d481dfafb10331ac78dc29ef3776f7 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -23,7 +26,7 @@
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
similarity index 90%
rename from tests/qemuxml2xmloutdata/video-virtio-gpu-virgl.xml
rename to tests/qemuxml2xmloutdata/video-virtio-gpu-virgl.x86_64-latest.xml
index d26ada53a38e9ba00dfc00f1106234bd639257c6..48b1d833ff16d0286bb352ad9027b9167026ba8e 100644 (file)
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='pc'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='forbid'>qemu64</model>
+  </cpu>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
@@ -23,7 +26,7 @@
     <controller type='ide' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
-    <controller type='usb' index='0'>
+    <controller type='usb' index='0' model='piix3-uhci'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='pci' index='0' model='pci-root'/>
index 4cc411eba4326ab6973eb7a03ee2aa2732b5e7ba..49cd2310df034eede312f4044c485e983eb8a03a 100644 (file)
@@ -1018,20 +1018,10 @@ mymain(void)
 
     DO_TEST_CAPS_LATEST("net-udp");
 
-    DO_TEST("video-virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU);
-    DO_TEST("video-virtio-gpu-virgl",
-            QEMU_CAPS_DEVICE_VIRTIO_GPU,
-            QEMU_CAPS_VIRTIO_GPU_VIRGL);
-    DO_TEST("video-virtio-gpu-spice-gl",
-            QEMU_CAPS_DEVICE_VIRTIO_GPU,
-            QEMU_CAPS_VIRTIO_GPU_VIRGL,
-            QEMU_CAPS_SPICE,
-            QEMU_CAPS_SPICE_GL,
-            QEMU_CAPS_SPICE_RENDERNODE);
-    DO_TEST("video-virtio-gpu-sdl-gl",
-            QEMU_CAPS_DEVICE_VIRTIO_GPU,
-            QEMU_CAPS_VIRTIO_GPU_VIRGL,
-            QEMU_CAPS_SDL);
+    DO_TEST_CAPS_LATEST("video-virtio-gpu-device");
+    DO_TEST_CAPS_LATEST("video-virtio-gpu-virgl");
+    DO_TEST_CAPS_LATEST("video-virtio-gpu-spice-gl");
+    DO_TEST_CAPS_LATEST("video-virtio-gpu-sdl-gl");
 
     DO_TEST("virtio-input",
             QEMU_CAPS_VIRTIO_KEYBOARD,
@@ -1059,17 +1049,14 @@ mymain(void)
 
     DO_TEST_CAPS_LATEST("acpi-table");
 
-    DO_TEST("video-device-pciaddr-default",
-            QEMU_CAPS_KVM,
-            QEMU_CAPS_VNC,
-            QEMU_CAPS_DEVICE_QXL);
-    DO_TEST("video-qxl-heads", QEMU_CAPS_DEVICE_QXL);
-    DO_TEST("video-qxl-noheads", QEMU_CAPS_DEVICE_QXL);
-    DO_TEST("video-qxl-resolution", QEMU_CAPS_DEVICE_QXL);
-    DO_TEST("video-virtio-gpu-secondary", QEMU_CAPS_DEVICE_VIRTIO_GPU);
+    DO_TEST_CAPS_LATEST("video-device-pciaddr-default");
+    DO_TEST_CAPS_LATEST("video-qxl-heads");
+    DO_TEST_CAPS_LATEST("video-qxl-noheads");
+    DO_TEST_CAPS_LATEST("video-qxl-resolution");
+    DO_TEST_CAPS_LATEST("video-virtio-gpu-secondary");
     DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw", "s390x");
     DO_TEST_CAPS_ARCH_LATEST("video-virtio-gpu-ccw-auto", "s390x");
-    DO_TEST("video-none-device", QEMU_CAPS_VNC);
+    DO_TEST_CAPS_LATEST("video-none-device");
     DO_TEST_CAPS_LATEST("video-virtio-vga-gpu-gl");
     DO_TEST_CAPS_LATEST("video-virtio-blob-on");
     DO_TEST_CAPS_LATEST("video-virtio-blob-off");