aboutsummaryrefslogtreecommitdiff
path: root/test/dm/ofnode.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-31 14:43:04 -0400
committerTom Rini <trini@konsulko.com>2022-10-31 14:43:04 -0400
commita90afc6730e6c67ad37f4c98a02891a93b4ff971 (patch)
tree724c085433631e142a56c052d667139cba29b4a6 /test/dm/ofnode.c
parent6f38d91158e7e4199753b79e0a25c1a65175aba4 (diff)
parent77bec9e3d8bd2dc307447b92a3d5cefd693a62ad (diff)
Merge branch '2022-10-31-vbe-implement-the-full-firmware-flow'
To quote Simon: This series provides an implementation of VBE from TPL through to U-Boot proper, using VBE to load the relevant firmware stages. It buils a single image.bin file containing all the phases: TPL - initial phase, loads VPL using binman symbols VPL - main firmware phase, loads SPL using VBE parameters SPL - loads U-Boot proper using VBE parameters U-Boot - final firmware phase, where OS booting is processed This series does not include the OS-booting phase. That will be the subject of a future series. The implementation is entirely handled by sandbox. It should be possible to enable this on a real board without much effort, but that is also the subject of a future series.
Diffstat (limited to 'test/dm/ofnode.c')
-rw-r--r--test/dm/ofnode.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c
index 41811ec3bb..8077affabb 100644
--- a/test/dm/ofnode.c
+++ b/test/dm/ofnode.c
@@ -753,10 +753,7 @@ static int make_ofnode_fdt(struct unit_test_state *uts, void *fdt, int size,
static int dm_test_ofnode_root(struct unit_test_state *uts)
{
- char fdt[256];
- oftree tree;
ofnode node;
- int ret;
/* Check that aliases work on the control FDT */
node = ofnode_get_aliases_node("ethernet3");
@@ -765,14 +762,22 @@ static int dm_test_ofnode_root(struct unit_test_state *uts)
ut_assert(!oftree_valid(oftree_null()));
- ut_assertok(make_ofnode_fdt(uts, fdt, sizeof(fdt), 0));
- ret = get_oftree(uts, fdt, &tree);
+ return 0;
+}
+DM_TEST(dm_test_ofnode_root, UT_TESTF_SCAN_FDT);
- /* skip the rest of this test if multiple FDTs are not supported */
- if (ret == -EOVERFLOW)
- return 0;
+static int dm_test_ofnode_root_mult(struct unit_test_state *uts)
+{
+ char fdt[256];
+ oftree tree;
+ ofnode node;
- ut_assertok(ret);
+ /* skip this test if multiple FDTs are not supported */
+ if (!IS_ENABLED(CONFIG_OFNODE_MULTI_TREE))
+ return -EAGAIN;
+
+ ut_assertok(make_ofnode_fdt(uts, fdt, sizeof(fdt), 0));
+ ut_assertok(get_oftree(uts, fdt, &tree));
ut_assert(oftree_valid(tree));
/* Make sure they don't work on this new tree */
@@ -791,7 +796,7 @@ static int dm_test_ofnode_root(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_ofnode_root, UT_TESTF_SCAN_FDT);
+DM_TEST(dm_test_ofnode_root_mult, UT_TESTF_SCAN_FDT);
static int dm_test_ofnode_livetree_writing(struct unit_test_state *uts)
{