From b53c724eb25c32ba73e68e61219fc53f601b18f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= Date: Mon, 19 Oct 2026 17:39:54 +0200 Subject: [PATCH] support/testing: use host entropy for ARMv7 emulation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running tests depending on entropy pool being ready on armv7 (eg: test_openscap.py, which runs the 'oscap' binary, which tries to get random bytes, even with simple commands), the test may fail on timeout due to the entropy pool not being ready; this is confirmed by the test being blocked until "crng init done" line appears in the kernel logs. A solution could be to just increase the test timeout to a value large enough to make sure that the entropy pool will be ready in most cases, but it may be hard to find a value that fits all use cases, and all tests depending on entropy being ready would deserve the same fix. Another solution is to replicate what commit 7acb32dabb80 ("support/testing: add builtin armv5 kernel 4.19 with entropy") did: it added the virtio-rng-pci argument to allow the guest machine to use host entropy. The armv7 kernel used for testing seems to be built with the relevant virtio configuration to allow a similar pass-through, so pass virtio-rng-device to armv7 kernel when running tests. Signed-off-by: Alexis Lothoré Signed-off-by: Thomas Petazzoni --- support/testing/infra/emulator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py index 3702ee2d48..d690949120 100644 --- a/support/testing/infra/emulator.py +++ b/support/testing/infra/emulator.py @@ -98,6 +98,7 @@ class Emulator(object): "vexpress-v2p-ca9-5.10.202.dtb") qemu_cmd += ["-dtb", dtb] qemu_cmd += ["-M", "vexpress-a9"] + qemu_cmd += ["-device", "virtio-rng-device"] elif arch == "armv5": kernel = infra.download(self.downloaddir, "kernel-versatile-5.10.202")