test: enable virtio-rng device for QEMU guests
authorFranck Bui <fbui@suse.com>
Thu, 2 Jun 2022 07:31:55 +0000 (09:31 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 2 Jun 2022 16:52:28 +0000 (01:52 +0900)
commit4d5d28e9a6ff3c208f0b11914cdd5e2a9055bb28
tree6d78dcf8863209c0100b950f7083a358c740303d
parent6a9f3cef8cc938d89c62e37de2b2d6e5c38adbcb
test: enable virtio-rng device for QEMU guests

If rngd is included in the host initrd, QEMU guests need at least one source of
entropy otherwise rngd will refuse to start. Hence this patch enables the
virtio RNG device in QEMU guests (exposed as a HW RNG device available at
/dev/hwrng).

As a safety measure, the patch limits the data sent to the guest to 1KB per
second in order to not let the guest starve the host entropy.
test/test-functions