[PATCH 02/15] test: Fix bootm_test_subst_var() running independently

Simon Glass sjg at chromium.org
Sun Aug 7 01:51:46 CEST 2022


This test relies on the silent_linux env variable being set. Add this
to the code so it can run without relying on other bootm tests having been
run first.

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

 test/bootm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/bootm.c b/test/bootm.c
index 7d03e1e0c68..4bb3ca0655c 100644
--- a/test/bootm.c
+++ b/test/bootm.c
@@ -208,7 +208,8 @@ BOOTM_TEST(bootm_test_silent_var, 0);
 /* Test substitution processing in the bootargs variable */
 static int bootm_test_subst_var(struct unit_test_state *uts)
 {
-	env_set("bootargs", NULL);
+	ut_assertok(env_set("silent_linux", "yes"));
+	ut_assertok(env_set("bootargs", NULL));
 	ut_assertok(bootm_process_cmdline_env(BOOTM_CL_SILENT));
 	ut_asserteq_str("console=ttynull", env_get("bootargs"));
 
-- 
2.37.1.559.g78731f0fdb-goog



More information about the U-Boot mailing list