]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: cmd: fdt: fix chosen test for DM_RNG
authorTim Harvey <tharvey@gateworks.com>
Tue, 18 Jun 2024 21:06:09 +0000 (14:06 -0700)
committerTom Rini <trini@konsulko.com>
Fri, 28 Jun 2024 23:30:45 +0000 (17:30 -0600)
Now that kaslr-seed is automatically added to the chosen node if DM_RNG
is enabled, adjust the test to expect this.

Take care not to expect kaslr-seed for CONFIG_MEASURED_BOOT and
CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT as we do not add it for those.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Cc: Michal Simek <michal.simek@amd.com>
Cc: Andy Yan <andy.yan@rock-chips.com>
Cc: Akash Gajjar <gajjar04akash@gmail.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Devarsh Thakkar <devarsht@ti.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Chris Morgan <macromorgan@hotmail.com>
test/cmd/fdt.c

index 5470855217586452172a4c6515dc48b188f6d886..5cda1ef382a11737cb5561206ff341668b367315 100644 (file)
@@ -1347,6 +1347,10 @@ static int fdt_test_chosen(struct unit_test_state *uts)
        ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
        if (env_bootargs)
                ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
+       if (IS_ENABLED(CONFIG_DM_RNG) &&
+           !IS_ENABLED(CONFIG_MEASURED_BOOT) &&
+           !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT))
+               ut_assert_nextlinen("\tkaslr-seed = ");
        ut_assert_nextline("};");
        ut_assertok(ut_check_console_end(uts));
 
@@ -1363,6 +1367,10 @@ static int fdt_test_chosen(struct unit_test_state *uts)
        ut_assert_nextlinen("\tu-boot,version = "); /* Ignore the version string */
        if (env_bootargs)
                ut_assert_nextline("\tbootargs = \"%s\";", env_bootargs);
+       if (IS_ENABLED(CONFIG_DM_RNG) &&
+           !IS_ENABLED(CONFIG_MEASURED_BOOT) &&
+           !IS_ENABLED(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT))
+               ut_assert_nextlinen("\tkaslr-seed = ");
        ut_assert_nextline("};");
        ut_assertok(ut_check_console_end(uts));