]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: Fix bootm_test_subst_var() running independently
authorSimon Glass <sjg@chromium.org>
Sat, 6 Aug 2022 23:51:46 +0000 (17:51 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 12 Sep 2022 22:06:36 +0000 (18:06 -0400)
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@chromium.org>
test/bootm.c

index 7d03e1e0c6802cd866586c472b97c9d06c7d64d0..4bb3ca0655cf8b0a7c5bb8ecd5297b90eb814aae 100644 (file)
@@ -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"));