[PATCH 6/7] tests: Reorganize and simplify GIC test cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Unify the naming to prepare for new test cases that will be added
later on.

Moreover, since we're only interested in testing GIC support here,
simplify XML files by getting rid of the unrelevant bits.
---
 ...v-aarch64-gic.args => qemuxml2argv-aarch64-gic-v2.args} | 13 ++++---------
 ...rgv-aarch64-gic.xml => qemuxml2argv-aarch64-gic-v2.xml} | 14 ++------------
 ...aarch64-gicv3.args => qemuxml2argv-aarch64-gic-v3.args} | 12 ++++--------
 ...v-aarch64-gicv3.xml => qemuxml2argv-aarch64-gic-v3.xml} | 14 ++------------
 tests/qemuxml2argvtest.c                                   | 13 +++++++------
 tests/qemuxml2xmltest.c                                    |  4 ++--
 6 files changed, 21 insertions(+), 49 deletions(-)
 rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-gic.args => qemuxml2argv-aarch64-gic-v2.args} (57%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-gic.xml => qemuxml2argv-aarch64-gic-v2.xml} (61%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-gicv3.args => qemuxml2argv-aarch64-gic-v3.args} (55%)
 rename tests/qemuxml2argvdata/{qemuxml2argv-aarch64-gicv3.xml => qemuxml2argv-aarch64-gic-v3.xml} (61%)

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
similarity index 57%
rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args
rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
index be19ea4..d30f449 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.args
@@ -7,19 +7,14 @@ QEMU_AUDIO_DRV=none \
 /usr/bin/qemu-system-aarch64 \
 -name aarch64test \
 -S \
--M virt \
--no-kvm \
--cpu cortex-a53 \
+-machine virt,accel=kvm \
+-cpu host \
 -m 1024 \
 -smp 1 \
 -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
 -nographic \
 -nodefaults \
 -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
 -boot c \
--kernel /aarch64.kernel \
--initrd /aarch64.initrd \
--append console=ttyAMA0 \
--usb \
--net nic,macaddr=52:54:00:09:a4:37,vlan=0,model=virtio,name=net0 \
--net user,vlan=0,name=hostnet0
+-usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
similarity index 61%
rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
index cb595e4..9ccba99 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v2.xml
@@ -1,4 +1,4 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>aarch64test</name>
   <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
   <memory unit='KiB'>1048576</memory>
@@ -6,27 +6,17 @@
   <vcpu placement='static'>1</vcpu>
   <os>
     <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>
+  <cpu mode='host-passthrough'/>
   <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.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
similarity index 55%
rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args
rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
index a3530bb..9cd86ac 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.args
@@ -7,18 +7,14 @@ QEMU_AUDIO_DRV=none \
 /usr/bin/qemu-system-aarch64 \
 -name aarch64test \
 -S \
--machine virt,accel=tcg,gic-version=3 \
--cpu cortex-a53 \
+-machine virt,accel=kvm,gic-version=3 \
+-cpu host \
 -m 1024 \
 -smp 1 \
 -uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
 -nographic \
 -nodefaults \
 -monitor unix:/tmp/test-monitor,server,nowait \
+-no-acpi \
 -boot c \
--kernel /aarch64.kernel \
--initrd /aarch64.initrd \
--append console=ttyAMA0 \
--usb \
--net nic,macaddr=52:54:00:09:a4:37,vlan=0,model=virtio,name=net0 \
--net user,vlan=0,name=hostnet0
+-usb
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
similarity index 61%
rename from tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
index 72aaaf7..7c9ee92 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gicv3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-v3.xml
@@ -1,4 +1,4 @@
-<domain type='qemu'>
+<domain type='kvm'>
   <name>aarch64test</name>
   <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
   <memory unit='KiB'>1048576</memory>
@@ -6,27 +6,17 @@
   <vcpu placement='static'>1</vcpu>
   <os>
     <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>
+  <cpu mode='host-passthrough'/>
   <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/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a5d4722..2ad5f5d 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1673,13 +1673,14 @@ mymain(void)
     DO_TEST("aarch64-cpu-passthrough", QEMU_CAPS_DEVICE,
             QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
             QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
-    DO_TEST("aarch64-gic", QEMU_CAPS_DEVICE,
-            QEMU_CAPS_KVM);
-    DO_TEST("aarch64-gicv3", QEMU_CAPS_DEVICE,
-            QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
+    DO_TEST("aarch64-gic-v2", QEMU_CAPS_DEVICE,
+            QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
             QEMU_CAPS_MACH_VIRT_GIC_VERSION);
-    DO_TEST_FAILURE("aarch64-gicv3", QEMU_CAPS_DEVICE,
-            QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
+    DO_TEST("aarch64-gic-v3", QEMU_CAPS_DEVICE,
+            QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST,
+            QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+    DO_TEST_FAILURE("aarch64-gic-v3", QEMU_CAPS_DEVICE,
+            QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_CPU_HOST);
 
     driver.caps->host.cpu->arch = VIR_ARCH_AARCH64;
     DO_TEST("aarch64-kvm-32-on-64", QEMU_CAPS_DEVICE,
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 19e6c1b..bdf96a6 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -604,8 +604,8 @@ mymain(void)
     DO_TEST("smbios-multiple-type2");
     DO_TEST("aarch64-aavmf-virtio-mmio");
 
-    DO_TEST("aarch64-gic");
-    DO_TEST("aarch64-gicv3");
+    DO_TEST("aarch64-gic-v2");
+    DO_TEST("aarch64-gic-v3");
 
     DO_TEST("memory-hotplug");
     DO_TEST("memory-hotplug-nonuma");
-- 
2.5.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]