[libvirt] [PATCH] tests: Check GIC-related XMLs in qemuxml2xmltest

Martin Kletzander mkletzan at redhat.com
Thu Oct 1 12:30:52 UTC 2015


Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
This is based on the GIC-support series from Pavel Fedin with the
fixups mentioned there as well:
https://www.redhat.com/archives/libvir-list/2015-September/msg01067.html

 .../qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml  | 30 +++++++++++++---------
 .../qemuxml2argv-aarch64-gicv3.xml                 | 30 +++++++++++++---------
 tests/qemuxml2xmltest.c                            |  3 +++
 3 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
index 08d3d714b8c2..cb595e4a7a6b 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
@@ -1,26 +1,32 @@
-<domain type="qemu">
+<domain type='qemu'>
   <name>aarch64test</name>
   <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
-  <memory>1048576</memory>
-  <currentMemory>1048576</currentMemory>
-  <vcpu>1</vcpu>
-  <features>
-    <acpi/>
-    <gic version='2'/>
-  </features>
-  <cpu match='exact'>
-    <model>cortex-a53</model>
-  </cpu>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch="aarch64" machine="virt">hvm</type>
+    <type arch='aarch64' machine='virt'>hvm</type>
     <kernel>/aarch64.kernel</kernel>
     <initrd>/aarch64.initrd</initrd>
     <cmdline>console=ttyAMA0</cmdline>
+    <boot dev='hd'/>
   </os>
+  <features>
+    <acpi/>
+    <gic version='2'/>
+  </features>
+  <cpu mode='custom' match='exact'>
+    <model fallback='allow'>cortex-a53</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-aarch64</emulator>
     <interface type='user'>
       <mac address='52:54:00:09:a4:37'/>
+      <model type='virtio'/>
     </interface>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml
index f8d63c337755..72aaaf7fe5cd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml
@@ -1,26 +1,32 @@
-<domain type="qemu">
+<domain type='qemu'>
   <name>aarch64test</name>
   <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
-  <memory>1048576</memory>
-  <currentMemory>1048576</currentMemory>
-  <vcpu>1</vcpu>
-  <features>
-    <acpi/>
-    <gic version='3'/>
-  </features>
-  <cpu match='exact'>
-    <model>cortex-a53</model>
-  </cpu>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
   <os>
-    <type arch="aarch64" machine="virt">hvm</type>
+    <type arch='aarch64' machine='virt'>hvm</type>
     <kernel>/aarch64.kernel</kernel>
     <initrd>/aarch64.initrd</initrd>
     <cmdline>console=ttyAMA0</cmdline>
+    <boot dev='hd'/>
   </os>
+  <features>
+    <acpi/>
+    <gic version='3'/>
+  </features>
+  <cpu mode='custom' match='exact'>
+    <model fallback='allow'>cortex-a53</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-aarch64</emulator>
     <interface type='user'>
       <mac address='52:54:00:09:a4:37'/>
+      <model type='virtio'/>
     </interface>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index eae153c5e763..5a9c67df7e02 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -625,6 +625,9 @@ mymain(void)
     DO_TEST("smbios-multiple-type2");
     DO_TEST("aarch64-aavmf-virtio-mmio");

+    DO_TEST("aarch64-gic");
+    DO_TEST("aarch64-gicv3");
+
     DO_TEST("memory-hotplug");
     DO_TEST("memory-hotplug-nonuma");
     DO_TEST("memory-hotplug-dimm");
--
2.6.0




More information about the libvir-list mailing list