]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2xmltest: Modernize all 'net-' tests
authorPeter Krempa <pkrempa@redhat.com>
Thu, 17 Aug 2023 11:16:34 +0000 (13:16 +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>
tests/qemuxml2argvdata/net-virtio-teaming-hostdev.xml
tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-bandwidth.xml with 94% similarity]
tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-bandwidth2.xml with 93% similarity]
tests/qemuxml2xmloutdata/net-hostdev-vfio.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-hostdev-vfio.xml with 92% similarity]
tests/qemuxml2xmloutdata/net-user-passt.xml [deleted symlink]
tests/qemuxml2xmloutdata/net-vdpa-multiqueue.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml with 88% similarity]
tests/qemuxml2xmloutdata/net-vdpa.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-vdpa.xml with 88% similarity]
tests/qemuxml2xmloutdata/net-virtio-teaming-hostdev.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-virtio-teaming-hostdev.xml with 100% similarity]
tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-virtio-teaming-network.xml with 92% similarity]
tests/qemuxml2xmloutdata/net-virtio-teaming.x86_64-latest.xml [moved from tests/qemuxml2xmloutdata/net-virtio-teaming.xml with 94% similarity]
tests/qemuxml2xmltest.c

index 46171ddf09cf189aaa685399eb3f576c711c44b6..0df38ec42d91e0b70a01d7280c7b20bab6952450 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='pci' index='0' model='pci-root'/>
similarity index 94%
rename from tests/qemuxml2xmloutdata/net-bandwidth.xml
rename to tests/qemuxml2xmloutdata/net-bandwidth.x86_64-latest.xml
index 7d5c552202ae2f026baca396901c1a095d69bc73..7d634d8940c3efbc4a69f93a72b5acdf3af62487 100644 (file)
@@ -15,6 +15,9 @@
     <apic/>
     <pae/>
   </features>
+  <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>
@@ -34,7 +37,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='1' 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 93%
rename from tests/qemuxml2xmloutdata/net-bandwidth2.xml
rename to tests/qemuxml2xmloutdata/net-bandwidth2.x86_64-latest.xml
index 7d5209a64a7b7df681f62c03ae93d374cf7ded8b..9ec0172dfc89d03a310e608e2938e5b1d4e6634f 100644 (file)
@@ -15,6 +15,9 @@
     <apic/>
     <pae/>
   </features>
+  <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>
@@ -27,7 +30,7 @@
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </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='virtio-serial' index='0'>
similarity index 92%
rename from tests/qemuxml2xmloutdata/net-hostdev-vfio.xml
rename to tests/qemuxml2xmloutdata/net-hostdev-vfio.x86_64-latest.xml
index 5d9696afd51caa38ef98c410ffcb845cd0fe5e39..167e1b1feab9bb8d098a27f15834acee2ce9260c 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'>
diff --git a/tests/qemuxml2xmloutdata/net-user-passt.xml b/tests/qemuxml2xmloutdata/net-user-passt.xml
deleted file mode 120000 (symlink)
index cfbc023..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../qemuxml2argvdata/net-user-passt.xml
\ No newline at end of file
similarity index 88%
rename from tests/qemuxml2xmloutdata/net-vdpa-multiqueue.xml
rename to tests/qemuxml2xmloutdata/net-vdpa-multiqueue.x86_64-latest.xml
index 0876d5df628a204c4043806ec05bdc5759fbd62c..71d171764d2fc0b8f1eb6b523c18dd86d24fd476 100644 (file)
@@ -8,13 +8,16 @@
     <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>
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <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 88%
rename from tests/qemuxml2xmloutdata/net-vdpa.xml
rename to tests/qemuxml2xmloutdata/net-vdpa.x86_64-latest.xml
index 0c7ff151d78c17c62f0fb157205d692422225444..407b25de40fe4e27177eb1398a201ecf531e78a3 100644 (file)
@@ -8,13 +8,16 @@
     <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>
   <on_crash>destroy</on_crash>
   <devices>
     <emulator>/usr/bin/qemu-system-x86_64</emulator>
-    <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/net-virtio-teaming-network.xml
rename to tests/qemuxml2xmloutdata/net-virtio-teaming-network.x86_64-latest.xml
index 99da3de48b45c2a0b69054198a024a05987c8b90..dcb2339035f50eb120995b2a4f219bc26c210e1f 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='pci' index='0' model='pci-root'/>
similarity index 94%
rename from tests/qemuxml2xmloutdata/net-virtio-teaming.xml
rename to tests/qemuxml2xmloutdata/net-virtio-teaming.x86_64-latest.xml
index 05a1dd1d2ffe03fd350041a8fc8177b7cd66b716..0c744f795cbf1f2238f6daa0344f0a9711e19dea 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='pci' index='0' model='pci-root'/>
index 49cd2310df034eede312f4044c485e983eb8a03a..5e7430f0cb05419790a4531b39ebecd48d5bc522 100644 (file)
@@ -426,28 +426,25 @@ mymain(void)
     DO_TEST_CAPS_LATEST("net-eth-unmanaged-tap");
     DO_TEST_CAPS_LATEST("net-virtio-network-portgroup");
     DO_TEST_CAPS_LATEST("net-virtio-rxtxqueuesize");
-    DO_TEST("net-virtio-teaming",
-            QEMU_CAPS_DEVICE_VFIO_PCI);
-    DO_TEST("net-virtio-teaming-network",
-            QEMU_CAPS_DEVICE_VFIO_PCI);
-    DO_TEST("net-virtio-teaming-hostdev",
-            QEMU_CAPS_DEVICE_VFIO_PCI);
+    DO_TEST_CAPS_LATEST("net-virtio-teaming");
+    DO_TEST_CAPS_LATEST("net-virtio-teaming-network");
+    DO_TEST_CAPS_LATEST("net-virtio-teaming-hostdev");
     DO_TEST_CAPS_LATEST("net-isolated-port");
     DO_TEST_CAPS_LATEST("net-hostdev");
     DO_TEST_CAPS_LATEST("net-hostdev-bootorder");
-    DO_TEST("net-hostdev-vfio", QEMU_CAPS_DEVICE_VFIO_PCI);
+    DO_TEST_CAPS_LATEST("net-hostdev-vfio");
     DO_TEST_CAPS_LATEST("net-midonet");
     DO_TEST_CAPS_LATEST("net-openvswitch");
     DO_TEST_CAPS_LATEST("sound-device");
     DO_TEST_CAPS_LATEST("watchdog");
     DO_TEST_CAPS_LATEST("watchdog-q35-multiple");
-    DO_TEST("net-bandwidth", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
-    DO_TEST("net-bandwidth2", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_VNC);
+    DO_TEST_CAPS_LATEST("net-bandwidth");
+    DO_TEST_CAPS_LATEST("net-bandwidth2");
     DO_TEST_CAPS_LATEST("net-mtu");
     DO_TEST_CAPS_LATEST("net-coalesce");
     DO_TEST_CAPS_LATEST("net-many-models");
-    DO_TEST("net-vdpa", QEMU_CAPS_NETDEV_VHOST_VDPA);
-    DO_TEST("net-vdpa-multiqueue", QEMU_CAPS_NETDEV_VHOST_VDPA);
+    DO_TEST_CAPS_LATEST("net-vdpa");
+    DO_TEST_CAPS_LATEST("net-vdpa-multiqueue");
     DO_TEST_CAPS_LATEST("net-virtio-rss");
 
     DO_TEST_CAPS_LATEST("serial-tcp-tlsx509-chardev");