From: Simon Glass Date: Tue, 26 Sep 2023 14:14:38 +0000 (-0600) Subject: dm: core: Ensure we run flattree tests on ofnode X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=3a1fc17a01442e9b11e2dbf803dc0b6e73b9a9fb;p=u-boot.git dm: core: Ensure we run flattree tests on ofnode We need the UT_TESTF_SCAN_FDT flag set for these tests to run with flat tree. In some cases it is missing, so add it. Signed-off-by: Simon Glass --- diff --git a/test/dm/ofnode.c b/test/dm/ofnode.c index dee71ee5e5..6f21d66a95 100644 --- a/test/dm/ofnode.c +++ b/test/dm/ofnode.c @@ -114,7 +114,7 @@ static int dm_test_ofnode_compatible_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_compatible_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_compatible_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_get_by_phandle(struct unit_test_state *uts) { @@ -146,7 +146,8 @@ static int dm_test_ofnode_get_by_phandle_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_get_by_phandle_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_get_by_phandle_ot, + UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int check_prop_values(struct unit_test_state *uts, ofnode start, const char *propname, const char *propval, @@ -196,7 +197,8 @@ static int dm_test_ofnode_by_prop_value_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_by_prop_value_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_by_prop_value_ot, + UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_fmap(struct unit_test_state *uts) { @@ -237,7 +239,7 @@ static int dm_test_ofnode_read(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_read, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); +DM_TEST(dm_test_ofnode_read, UT_TESTF_SCAN_FDT); static int dm_test_ofnode_read_ot(struct unit_test_state *uts) { @@ -256,7 +258,7 @@ static int dm_test_ofnode_read_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_read_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_read_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_phandle(struct unit_test_state *uts) { @@ -452,7 +454,8 @@ static int dm_test_ofnode_get_child_count_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_get_child_count_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_get_child_count_ot, + UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_is_enabled(struct unit_test_state *uts) { @@ -526,7 +529,7 @@ static int dm_test_ofnode_get_reg_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_get_reg_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_get_reg_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_get_path(struct unit_test_state *uts) { @@ -566,7 +569,7 @@ static int dm_test_ofnode_get_path_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_get_path_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_get_path_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_conf(struct unit_test_state *uts) { @@ -581,7 +584,7 @@ static int dm_test_ofnode_conf(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_conf, 0); +DM_TEST(dm_test_ofnode_conf, UT_TESTF_SCAN_FDT); static int dm_test_ofnode_options(struct unit_test_state *uts) { @@ -665,7 +668,7 @@ static int dm_test_ofnode_string(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_string, 0); +DM_TEST(dm_test_ofnode_string, UT_TESTF_SCAN_FDT); static int dm_test_ofnode_string_err(struct unit_test_state *uts) { @@ -736,7 +739,7 @@ static int dm_test_ofnode_get_phy(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_get_phy, 0); +DM_TEST(dm_test_ofnode_get_phy, UT_TESTF_SCAN_FDT); /** * make_ofnode_fdt() - Create an FDT for testing with ofnode @@ -920,7 +923,7 @@ static int dm_test_ofnode_write_copy_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_write_copy_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_write_copy_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_u32(struct unit_test_state *uts) { @@ -1122,7 +1125,7 @@ static int dm_test_ofnode_by_compatible_ot(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ofnode_by_compatible_ot, UT_TESTF_OTHER_FDT); +DM_TEST(dm_test_ofnode_by_compatible_ot, UT_TESTF_SCAN_FDT | UT_TESTF_OTHER_FDT); static int dm_test_ofnode_find_subnode(struct unit_test_state *uts) { @@ -1291,7 +1294,7 @@ static int dm_test_livetree_align(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_livetree_align, UT_TESTF_LIVE_TREE); +DM_TEST(dm_test_livetree_align, UT_TESTF_SCAN_FDT | UT_TESTF_LIVE_TREE); /* check that it is possible to load an arbitrary livetree */ static int dm_test_livetree_ensure(struct unit_test_state *uts) @@ -1310,4 +1313,4 @@ static int dm_test_livetree_ensure(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_livetree_ensure, 0); +DM_TEST(dm_test_livetree_ensure, UT_TESTF_SCAN_FDT);