--- .../qemuxml2argv-virtio-rng-multiple.args | 9 +++++++ .../qemuxml2argv-virtio-rng-multiple.xml | 31 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args new file mode 100644 index 0000000..1082ede --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.args @@ -0,0 +1,9 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu -S \ +-M pc -m 214 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 \ +-object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x7 \ +-chardev socket,id=charrng1,host=1.2.3.4,port=1234 \ +-object rng-egd,chardev=charrng1,id=rng1 \ +-device virtio-rng-pci,rng=rng1,bus=pci.0,addr=0x4 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.xml new file mode 100644 index 0000000..31269d0 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-multiple.xml @@ -0,0 +1,31 @@ +<domain type='qemu'> + <name>QEMUGuest1</name> + <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>219100</memory> + <currentMemory unit='KiB'>219100</currentMemory> + <vcpu placement='static' cpuset='1-4,8-20,525'>1</vcpu> + <os> + <type arch='i686' machine='pc'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <controller type='usb' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'/> + <rng model='virtio'> + <backend model='random'/> + <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> + </rng> + <rng model='virtio'> + <backend model='egd' type='tcp'> + <source mode='connect' host='1.2.3.4' service='1234'/> + <protocol type='raw'/> + </backend> + </rng> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 28436f2..115cd37 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1283,6 +1283,8 @@ mymain(void) QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST("virtio-rng-egd", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_EGD); + DO_TEST("virtio-rng-multiple", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_VIRTIO_RNG, + QEMU_CAPS_OBJECT_RNG_EGD, QEMU_CAPS_OBJECT_RNG_RANDOM); DO_TEST_PARSE_ERROR("virtio-rng-egd-crash", QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_EGD); DO_TEST("virtio-rng-ccw", -- 2.0.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list