mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-22 00:41:55 -09:00
support/testing: use host entropy for ARMv7 emulation
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 7acb32dabb
("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é <alexis.lothore@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
34dc16e77e
commit
b53c724eb2
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user