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

Message ID 20260416023021.626949-31-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(), bootstd_images() scans for bootflows and binds
extra MMC nodes but declares itself with only UTF_CONSOLE, so the DM
teardown path never runs. This leaks around 55KB of device state per
run.

Add UTF_DM and UTF_SCAN_FDT to match the other bootflow tests.

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 c4be33a63c2..9648ecb7b99 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -1662,7 +1662,7 @@  static int bootstd_images(struct unit_test_state *uts)
 
 	return 0;
 }
-BOOTSTD_TEST(bootstd_images, UTF_CONSOLE);
+BOOTSTD_TEST(bootstd_images, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE);
 
 /* Check creation of ad-hoc images */
 static int bootstd_adhoc(struct unit_test_state *uts)