test: Fix optee unit test
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 15 Sep 2025 13:41:55 +0000 (15:41 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 24 Sep 2025 17:04:11 +0000 (11:04 -0600)
commit44c4919e9dd6c162b237633ba689441eca9a149c
tree74ba92f4db2c2ab089b89e1ae48fba02367af0a4
parent7cae89bac47cd8e79c91034865e5a671334f73fd
test: Fix optee unit test

This was apparently not built for several years: Since a2535243e011,
optee_copy_fdt_nodes implicitly works against the U-Boot dt. We
therefore have to tweak its reference before using the function and
restore things afterwards.

If it had been built, actually trying it out would have failed next: We
need CONFIG_OPTEE_LIB to actually build the function that is primarily
being tested here. And we need to re-initialize target fdt, now that the
tests may run in random order.

Fixes: a2535243e011 ("lib: optee: migration optee_copy_fdt_nodes for OF_LIVE support")
Fixes: ba2feaf41435 ("test: Split optee tests into three functions")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
test/optee/Kconfig
test/optee/optee.c