From 87673df2212ebb84593355310a43e91bca6c864e Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Wed, 25 Feb 2015 15:12:31 +0100 Subject: [PATCH] tests: Add test for virtio-mmio address type Commit 3e4b783e fixed an issue with RNG schema where this address type was missing, this commit adds a test for it. Signed-off-by: Martin Kletzander (cherry picked from commit 6b22e0b562d4e4abf2c0f88b8705b58e5b6c632b) --- ...emuxml2argv-aarch64-aavmf-virtio-mmio.args | 15 ++++++ ...qemuxml2argv-aarch64-aavmf-virtio-mmio.xml | 49 +++++++++++++++++++ tests/qemuxml2argvtest.c | 4 ++ tests/qemuxml2xmltest.c | 1 + 4 files changed, 69 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args new file mode 100644 index 0000000000..d6d8aed4da --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.args @@ -0,0 +1,15 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-aarch64 -S -M virt -cpu cortex-a53 \ +-m 1024 -smp 1 -nographic \ +-nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait \ +-boot c -kernel /aarch64.kernel -initrd /aarch64.initrd -append \ +'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \ +-dtb /aarch64.dtb -device virtio-serial-device,id=virtio-serial0 -usb \ +-drive file=/aarch64.raw,if=none,id=drive-virtio-disk0 \ +-device virtio-blk-device,drive=drive-virtio-disk0,id=virtio-disk0 \ +-device virtio-net-device,vlan=0,id=net0,mac=52:54:00:09:a4:37 \ +-net user,vlan=0,name=hostnet0 -chardev pty,id=charconsole0 \ +-device virtconsole,chardev=charconsole0,id=console0 \ +-device virtio-balloon-device,id=balloon0 \ +-object rng-random,id=objrng0,filename=/dev/random \ +-device virtio-rng-device,rng=objrng0,id=rng0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml new file mode 100644 index 0000000000..4a31c8b1cc --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-aavmf-virtio-mmio.xml @@ -0,0 +1,49 @@ + + aarch64test + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + /aarch64.kernel + /aarch64.initrd + earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait + /aarch64.dtb + + + + + + + + + cortex-a53 + + + destroy + restart + restart + + /usr/bin/qemu-system-aarch64 + + + +
+ + + + + + + + + + +
+ + + /dev/random + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index bd7c774eb1..ac23e39d3f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1523,6 +1523,10 @@ mymain(void) QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); + DO_TEST("aarch64-aavmf-virtio-mmio", + QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, + QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO, + QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST("aarch64-virt-default-nic", QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 99d46299af..271d6e13cd 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -422,6 +422,7 @@ mymain(void) DO_TEST_DIFFERENT("tap-vhost-incorrect"); DO_TEST("shmem"); DO_TEST("smbios"); + DO_TEST("aarch64-aavmf-virtio-mmio"); virObjectUnref(driver.caps); virObjectUnref(driver.xmlopt);