test: cmd/fdt: do not assume RNG device exists
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 9 Nov 2025 10:10:03 +0000 (11:10 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fri, 21 Nov 2025 18:18:22 +0000 (19:18 +0100)
commit797fe74ef72a6564ae3c878868a0c9d8cc0aea34
tree7a87b04291c4b4339484855c55eca0395ff2df97
parent094f71064bf22077bbde59460ec92ce3f0744b81
test: cmd/fdt: do not assume RNG device exists

In fdt_test_chosen() currently we test if DM_RNG is configured.
CONFIG_DM_RNG=y does not imply that a RNG device actually exists.
For instance QEMU may be called with -device virtio-rng-device or not.
The current test framework evicts the virtio RNG device even if QEMU is
called with -device virtio-rng-device.

In the fdt_test_chosen() check if a RNG device exists.
Ignore 'No RNG device' messages.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
test/cmd/fdt.c