]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Check default GIC version for aarch64/virt TCG guests
authorAndrea Bolognani <abologna@redhat.com>
Fri, 12 May 2017 12:05:55 +0000 (14:05 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 16 May 2017 14:48:30 +0000 (16:48 +0200)
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.xml [new file with mode: 0644]
tests/qemuxml2argvtest.c
tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml [new file with mode: 0644]
tests/qemuxml2xmltest.c

diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.args
new file mode 100644 (file)
index 0000000..975a014
--- /dev/null
@@ -0,0 +1,19 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-aarch64 \
+-name guest \
+-S \
+-machine virt,accel=tcg,gic-version=3 \
+-cpu cortex-a57 \
+-m 1024 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 6ba410c5-1e5c-4d57-bee7-2228e7ffa32f \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \
+-no-acpi \
+-boot c
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-gic-none-tcg.xml
new file mode 100644 (file)
index 0000000..0aa33db
--- /dev/null
@@ -0,0 +1,17 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <cpu mode='custom'>
+    <model>cortex-a57</model>
+  </cpu>
+  <devices>
+    <emulator>/usr/bin/qemu-system-aarch64</emulator>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index e308ffdbd6bccd7c479e6deb6fdd071b9fb8e4e7..4269598573cba71fe0c958fcc1172ba27f34c2c6 100644 (file)
@@ -2251,6 +2251,9 @@ mymain(void)
     DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH,
             QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
             QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+    DO_TEST_GIC("aarch64-gic-none-tcg", GIC_BOTH,
+            QEMU_CAPS_MACHINE_OPT,
+            QEMU_CAPS_MACH_VIRT_GIC_VERSION);
     DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
             QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
     DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-gic-none-tcg.xml
new file mode 100644 (file)
index 0000000..69510e2
--- /dev/null
@@ -0,0 +1,25 @@
+<domain type='qemu'>
+  <name>guest</name>
+  <uuid>6ba410c5-1e5c-4d57-bee7-2228e7ffa32f</uuid>
+  <memory unit='KiB'>1048576</memory>
+  <currentMemory unit='KiB'>1048576</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <os>
+    <type arch='aarch64' machine='virt'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <features>
+    <gic version='3'/>
+  </features>
+  <cpu mode='custom' match='exact' check='none'>
+    <model fallback='allow'>cortex-a57</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>
+    <memballoon model='none'/>
+  </devices>
+</domain>
index f8a607ffc481acb908e9604e8ee1522372f00f11..fed74d075124d2a5e4a9caa51d0c2673d03feb27 100644 (file)
@@ -1072,6 +1072,7 @@ mymain(void)
     DO_TEST_FULL("aarch64-gic-none-v2", WHEN_BOTH, GIC_V2, NONE);
     DO_TEST_FULL("aarch64-gic-none-v3", WHEN_BOTH, GIC_V3, NONE);
     DO_TEST_FULL("aarch64-gic-none-both", WHEN_BOTH, GIC_BOTH, NONE);
+    DO_TEST_FULL("aarch64-gic-none-tcg", WHEN_BOTH, GIC_BOTH, NONE);
     DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_NONE, NONE);
     DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_V2, NONE);
     DO_TEST_FULL("aarch64-gic-default", WHEN_BOTH, GIC_V3, NONE);