From: Franck Bui Date: Thu, 2 Jun 2022 07:31:55 +0000 (+0200) Subject: test: enable virtio-rng device for QEMU guests X-Git-Tag: v252-rc1~879 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d5d28e9a6ff3c208f0b11914cdd5e2a9055bb28;p=thirdparty%2Fsystemd.git 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. --- diff --git a/test/test-functions b/test/test-functions index daed481a292..a7026d7ad7b 100644 --- a/test/test-functions +++ b/test/test-functions @@ -452,6 +452,7 @@ run_qemu() { -nographic -kernel "$KERNEL_BIN" -drive "format=raw,cache=unsafe,file=$image" + -device "virtio-rng-pci,max-bytes=1024,period=1000" ) if [[ -n "${QEMU_OPTIONS:=}" ]]; then