summaryrefslogtreecommitdiff
path: root/test/dm/test-fdt.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-28 19:41:12 -0600
committerTom Rini <trini@konsulko.com>2020-08-07 22:31:32 -0400
commite180c2b129016baf21086eca73767844e7eff185 (patch)
tree9024230dcb1a4f3480cc18a4bed4e965ff406d51 /test/dm/test-fdt.c
parentbd34715599c17e0d3f09af1cdfba8af120bc8602 (diff)
dm: Rename DM test flags to make them more generic
The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/test-fdt.c')
-rw-r--r--test/dm/test-fdt.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index c64ac405ed..ac8ce99f51 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -390,7 +390,7 @@ static int dm_test_fdt_uclass_seq(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_fdt_uclass_seq, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_fdt_uclass_seq, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test that we can find a device by device tree offset */
static int dm_test_fdt_offset(struct unit_test_state *uts)
@@ -420,7 +420,7 @@ static int dm_test_fdt_offset(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_offset,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT | DM_TESTF_FLAT_TREE);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE);
/**
* Test various error conditions with uclass_first_device() and
@@ -461,7 +461,7 @@ static int dm_test_first_next_device(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_first_next_device, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_first_next_device, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test iteration through devices in a uclass */
static int dm_test_uclass_foreach(struct unit_test_state *uts)
@@ -482,7 +482,7 @@ static int dm_test_uclass_foreach(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_uclass_foreach, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_uclass_foreach, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/**
* check_devices() - Check return values and pointers
@@ -562,7 +562,7 @@ static int dm_test_first_next_ok_device(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_first_next_ok_device, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_first_next_ok_device, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static const struct udevice_id fdt_dummy_ids[] = {
{ .compatible = "denx,u-boot-fdt-dummy", },
@@ -617,7 +617,7 @@ static int dm_test_fdt_translation(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_fdt_translation, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_fdt_translation, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_fdt_remap_addr_flat(struct unit_test_state *uts)
{
@@ -637,7 +637,7 @@ static int dm_test_fdt_remap_addr_flat(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_flat,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT | DM_TESTF_FLAT_TREE);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE);
static int dm_test_fdt_remap_addr_index_flat(struct unit_test_state *uts)
{
@@ -659,7 +659,7 @@ static int dm_test_fdt_remap_addr_index_flat(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_index_flat,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT | DM_TESTF_FLAT_TREE);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE);
static int dm_test_fdt_remap_addr_name_flat(struct unit_test_state *uts)
{
@@ -681,7 +681,7 @@ static int dm_test_fdt_remap_addr_name_flat(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_name_flat,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT | DM_TESTF_FLAT_TREE);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT | UT_TESTF_FLAT_TREE);
static int dm_test_fdt_remap_addr_live(struct unit_test_state *uts)
{
@@ -701,7 +701,7 @@ static int dm_test_fdt_remap_addr_live(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_live,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_fdt_remap_addr_index_live(struct unit_test_state *uts)
{
@@ -723,7 +723,7 @@ static int dm_test_fdt_remap_addr_index_live(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_index_live,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_fdt_remap_addr_name_live(struct unit_test_state *uts)
{
@@ -745,7 +745,7 @@ static int dm_test_fdt_remap_addr_name_live(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_fdt_remap_addr_name_live,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_fdt_livetree_writing(struct unit_test_state *uts)
{
@@ -797,7 +797,7 @@ static int dm_test_fdt_livetree_writing(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_fdt_livetree_writing, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_fdt_livetree_writing, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_fdt_disable_enable_by_path(struct unit_test_state *uts)
{
@@ -824,8 +824,8 @@ static int dm_test_fdt_disable_enable_by_path(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_fdt_disable_enable_by_path, DM_TESTF_SCAN_PDATA |
- DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_fdt_disable_enable_by_path, UT_TESTF_SCAN_PDATA |
+ UT_TESTF_SCAN_FDT);
/* Test a few uclass phandle functions */
static int dm_test_fdt_phandle(struct unit_test_state *uts)
@@ -847,7 +847,7 @@ static int dm_test_fdt_phandle(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_fdt_phandle, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_fdt_phandle, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test device_find_first_child_by_uclass() */
static int dm_test_first_child(struct unit_test_state *uts)
@@ -874,7 +874,7 @@ static int dm_test_first_child(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_first_child, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_first_child, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test integer functions in dm_read_...() */
static int dm_test_read_int(struct unit_test_state *uts)
@@ -919,7 +919,7 @@ static int dm_test_read_int(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_read_int, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_read_int, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_read_int_index(struct unit_test_state *uts)
{
@@ -948,7 +948,7 @@ static int dm_test_read_int_index(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_read_int_index, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_read_int_index, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test iteration through devices by drvdata */
static int dm_test_uclass_drvdata(struct unit_test_state *uts)
@@ -969,7 +969,7 @@ static int dm_test_uclass_drvdata(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_uclass_drvdata, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_uclass_drvdata, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test device_first_child_ofdata_err(), etc. */
static int dm_test_child_ofdata(struct unit_test_state *uts)
@@ -988,7 +988,7 @@ static int dm_test_child_ofdata(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_child_ofdata, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_child_ofdata, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test device_first_child_err(), etc. */
static int dm_test_first_child_probe(struct unit_test_state *uts)
@@ -1007,7 +1007,7 @@ static int dm_test_first_child_probe(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_first_child_probe, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_first_child_probe, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test that ofdata is read for parents before children */
static int dm_test_ofdata_order(struct unit_test_state *uts)
@@ -1032,4 +1032,4 @@ static int dm_test_ofdata_order(struct unit_test_state *uts)
return 0;
}
-DM_TEST(dm_test_ofdata_order, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(dm_test_ofdata_order, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);