qemu: Add test cases for gic-version option

These tests make sure that we can use this option only when the capability is
set.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
This commit is contained in:
Pavel Fedin 2015-09-30 14:04:11 +03:00 committed by Martin Kletzander
parent b7621b7e96
commit 12a73cf14a
3 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,7 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 -S -machine virt,accel=tcg,gic-version=3 \
-cpu cortex-a53 -m 1024 -smp 1 \
-nographic -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -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

View File

@ -0,0 +1,26 @@
<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>
<os>
<type arch="aarch64" machine="virt">hvm</type>
<kernel>/aarch64.kernel</kernel>
<initrd>/aarch64.initrd</initrd>
<cmdline>console=ttyAMA0</cmdline>
</os>
<devices>
<emulator>/usr/bin/qemu-system-aarch64</emulator>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
</interface>
</devices>
</domain>

View File

@ -1644,6 +1644,11 @@ mymain(void)
QEMU_CAPS_CPU_HOST, QEMU_CAPS_KVM);
DO_TEST("aarch64-gic", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
QEMU_CAPS_KVM);
DO_TEST("aarch64-gicv3", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
DO_TEST_FAILURE("aarch64-gicv3", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
driver.caps->host.cpu->arch = VIR_ARCH_AARCH64;
DO_TEST("aarch64-kvm-32-on-64", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE,