[Concept,31/33] test: boot: Clean up DM state after bootstd_adhoc()

Message ID 20260416023021.626949-32-sjg@u-boot.org
State New
Headers
Series Fix memory leaks and test pollution in sandbox tests |

Commit Message

Simon Glass April 16, 2026, 2:29 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

Like bootflow_cmdline() and bootstd_images(), bootstd_adhoc() loads
from MMC but does not enable UTF_DM so nothing unwinds the probed
devices afterwards.

Add UTF_DM and UTF_SCAN_FDT to match the other tests.

Note: bootflow_efi() has the same issue, but we cannot enable UTF_DM
in that test, since it causes memory corruption, due to a conflict
between the lifetimes of the EFI subsystem and driver model. This is
left for a future effort.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/boot/bootflow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index 9648ecb7b99..a2a0a7eeb1e 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -1682,7 +1682,7 @@  static int bootstd_adhoc(struct unit_test_state *uts)
 
 	return 0;
 }
-BOOTSTD_TEST(bootstd_adhoc, UTF_CONSOLE);
+BOOTSTD_TEST(bootstd_adhoc, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Check scanning extlinux, adjusting cmdline and booting */
 static int bootflow_scan_extlinux(struct unit_test_state *uts)