[libvirt] [PATCH 3/4] tests: merge iommu tests

Ján Tomko jtomko at redhat.com
Tue Aug 29 16:48:15 UTC 2017


Using intremap without <ioapic driver='qemu'/> does not work.
Merge the tests to avoid a duplicit test once we start validating it.
---
 .../qemuxml2argv-intel-iommu-caching-mode.args     |  2 +-
 .../qemuxml2argv-intel-iommu-caching-mode.xml      |  5 +++-
 .../qemuxml2argv-intel-iommu-ioapic.args           | 21 ---------------
 .../qemuxml2argv-intel-iommu-ioapic.xml            | 31 ----------------------
 tests/qemuxml2argvtest.c                           |  6 +----
 .../qemuxml2xmlout-intel-iommu-ioapic.xml          |  1 -
 tests/qemuxml2xmltest.c                            |  1 -
 7 files changed, 6 insertions(+), 61 deletions(-)
 delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
 delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
 delete mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
index 5d12aabf4..81feecfcf 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
 /usr/bin/qemu-system-x86_64 \
 -name QEMUGuest1 \
 -S \
--machine q35,accel=tcg \
+-machine q35,accel=kvm,kernel_irqchip=split \
 -m 214 \
 -smp 1,sockets=1,cores=1,threads=1 \
 -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
index 5f3384da7..36a392403 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching-mode.xml
@@ -1,4 +1,4 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>QEMUGuest1</name>
   <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
   <memory unit='KiB'>219100</memory>
@@ -8,6 +8,9 @@
     <type arch='x86_64' machine='q35'>hvm</type>
     <boot dev='hd'/>
   </os>
+  <features>
+    <ioapic driver='qemu'/>
+  </features>
   <clock offset='utc'/>
   <on_poweroff>destroy</on_poweroff>
   <on_reboot>restart</on_reboot>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
deleted file mode 100644
index 8e70bf910..000000000
--- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.args
+++ /dev/null
@@ -1,21 +0,0 @@
-LC_ALL=C \
-PATH=/bin \
-HOME=/home/test \
-USER=test \
-LOGNAME=test \
-QEMU_AUDIO_DRV=none \
-/usr/bin/qemu-system-x86_64 \
--name QEMUGuest1 \
--S \
--machine q35,accel=kvm,kernel_irqchip=split \
--m 214 \
--smp 1,sockets=1,cores=1,threads=1 \
--uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
--nographic \
--nodefaults \
--chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
-server,nowait \
--mon chardev=charmonitor,id=monitor,mode=readline \
--no-acpi \
--boot c \
--device intel-iommu,intremap=on
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
deleted file mode 100644
index bfe714ad8..000000000
--- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<domain type='kvm'>
-  <name>QEMUGuest1</name>
-  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
-  <memory unit='KiB'>219100</memory>
-  <currentMemory unit='KiB'>219100</currentMemory>
-  <vcpu placement='static'>1</vcpu>
-  <os>
-    <type arch='x86_64' machine='q35'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <ioapic driver='qemu'/>
-  </features>
-  <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='pci' index='0' model='pcie-root'/>
-    <controller type='sata' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
-    </controller>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-    <iommu model='intel'>
-      <driver intremap='on'/>
-    </iommu>
-  </devices>
-</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 0c0bd16f9..3a0080297 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2699,14 +2699,10 @@ mymain(void)
     DO_TEST("intel-iommu-machine",
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_IOMMU);
-    DO_TEST("intel-iommu-ioapic",
+    DO_TEST("intel-iommu-caching-mode",
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_KERNEL_IRQCHIP,
             QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT,
-            QEMU_CAPS_INTEL_IOMMU_INTREMAP,
-            QEMU_CAPS_DEVICE_INTEL_IOMMU);
-    DO_TEST("intel-iommu-caching-mode",
-            QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_DEVICE_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_IOH3420,
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml
deleted file mode 120000
index 42d17b2c0..000000000
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-ioapic.xml
+++ /dev/null
@@ -1 +0,0 @@
-../qemuxml2argvdata/qemuxml2argv-intel-iommu-ioapic.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 311b71356..de8a781c1 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -1187,7 +1187,6 @@ mymain(void)
     DO_TEST("intel-iommu-machine",
             QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACHINE_IOMMU);
-    DO_TEST("intel-iommu-ioapic", NONE);
     DO_TEST("intel-iommu-caching-mode", NONE);
     DO_TEST("intel-iommu-eim", NONE);
     DO_TEST("intel-iommu-device-iotlb", NONE);
-- 
2.13.0




More information about the libvir-list mailing list