mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
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 <mkletzan@redhat.com>
This commit is contained in:
parent
b39b1397ea
commit
6b22e0b562
@ -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
|
@ -0,0 +1,49 @@
|
||||
<domain type='qemu'>
|
||||
<name>aarch64test</name>
|
||||
<uuid>496d7ea8-9739-544b-4ebd-ef08be936e8b</uuid>
|
||||
<memory unit='KiB'>1048576</memory>
|
||||
<currentMemory unit='KiB'>1048576</currentMemory>
|
||||
<vcpu placement='static'>1</vcpu>
|
||||
<os>
|
||||
<type arch='aarch64' machine='virt'>hvm</type>
|
||||
<kernel>/aarch64.kernel</kernel>
|
||||
<initrd>/aarch64.initrd</initrd>
|
||||
<cmdline>earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait</cmdline>
|
||||
<dtb>/aarch64.dtb</dtb>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<apic/>
|
||||
<pae/>
|
||||
</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>restart</on_crash>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-aarch64</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<source file='/aarch64.raw'/>
|
||||
<target dev='vda' bus='virtio'/>
|
||||
<address type='virtio-mmio'/>
|
||||
</disk>
|
||||
<controller type='virtio-serial' index='0'/>
|
||||
<interface type='user'>
|
||||
<mac address='52:54:00:09:a4:37'/>
|
||||
<model type='virtio'/>
|
||||
</interface>
|
||||
<console type='pty'>
|
||||
<target type='virtio' port='0'/>
|
||||
</console>
|
||||
<memballoon model='virtio'>
|
||||
<address type='virtio-mmio'/>
|
||||
</memballoon>
|
||||
<rng model='virtio'>
|
||||
<backend model='random'>/dev/random</backend>
|
||||
</rng>
|
||||
</devices>
|
||||
</domain>
|
@ -1510,6 +1510,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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user