aboutsummaryrefslogtreecommitdiff
path: root/test/cmd/fdt.c
diff options
context:
space:
mode:
authorSimon Glass2023-10-01 19:15:18 -0600
committerTom Rini2023-12-13 18:39:05 -0500
commit40565bba7c67c4e3584fa841818f7d2614da26b7 (patch)
tree444e5049fb5cf764047321af75df74fea6afbe2f /test/cmd/fdt.c
parent3535f607261ced5e1df361a51e301b2d212b30ec (diff)
test: fdt: Add a special case for real boards
The error that this test checks for is only shown on sandbox. For real boards, there is normally no error. Add a special case to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd/fdt.c')
-rw-r--r--test/cmd/fdt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index 1f103a1d7eb..54708552175 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -160,7 +160,13 @@ static int fdt_test_addr(struct unit_test_state *uts)
set_working_fdt_addr(0);
ut_assert_nextline("Working FDT set to 0");
ut_asserteq(CMD_RET_FAILURE, run_command("fdt addr", 0));
- ut_assert_nextline("libfdt fdt_check_header(): FDT_ERR_BADMAGIC");
+
+ /*
+ * sandbox fails the check for !blob since the 0 pointer is mapped to
+ * memory somewhere other than at 0x0
+ */
+ if (IS_ENABLED(CONFIG_SANDBOX))
+ ut_assert_nextline("libfdt fdt_check_header(): FDT_ERR_BADMAGIC");
ut_assertok(ut_check_console_end(uts));
/* Set up a working FDT and try again */