aboutsummaryrefslogtreecommitdiff
path: root/test/lib/lmb.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/lib/lmb.c
parentbd34715599c17e0d3f09af1cdfba8af120bc8602 (diff)
downloadu-boot-e180c2b129016baf21086eca73767844e7eff185.zip
u-boot-e180c2b129016baf21086eca73767844e7eff185.tar.gz
u-boot-e180c2b129016baf21086eca73767844e7eff185.tar.bz2
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/lib/lmb.c')
-rw-r--r--test/lib/lmb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/lib/lmb.c b/test/lib/lmb.c
index a344987..644ee78 100644
--- a/test/lib/lmb.c
+++ b/test/lib/lmb.c
@@ -201,7 +201,7 @@ static int lib_test_lmb_simple(struct unit_test_state *uts)
return test_multi_alloc_512mb(uts, 0xE0000000);
}
-DM_TEST(lib_test_lmb_simple, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_simple, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Create two memory regions with one reserved region and allocate */
static int lib_test_lmb_simple_x2(struct unit_test_state *uts)
@@ -217,7 +217,7 @@ static int lib_test_lmb_simple_x2(struct unit_test_state *uts)
return test_multi_alloc_512mb_x2(uts, 0xE0000000, 0x40000000);
}
-DM_TEST(lib_test_lmb_simple_x2, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_simple_x2, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Simulate 512 MiB RAM, allocate some blocks that fit/don't fit */
static int test_bigblock(struct unit_test_state *uts, const phys_addr_t ram)
@@ -284,7 +284,7 @@ static int lib_test_lmb_big(struct unit_test_state *uts)
return test_bigblock(uts, 0xE0000000);
}
-DM_TEST(lib_test_lmb_big, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_big, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Simulate 512 MiB RAM, allocate a block without previous reservation */
static int test_noreserved(struct unit_test_state *uts, const phys_addr_t ram,
@@ -359,7 +359,7 @@ static int lib_test_lmb_noreserved(struct unit_test_state *uts)
return test_noreserved(uts, 0xE0000000, 4, 1);
}
-DM_TEST(lib_test_lmb_noreserved, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_noreserved, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int lib_test_lmb_unaligned_size(struct unit_test_state *uts)
{
@@ -374,7 +374,7 @@ static int lib_test_lmb_unaligned_size(struct unit_test_state *uts)
return test_noreserved(uts, 0xE0000000, 5, 8);
}
-DM_TEST(lib_test_lmb_unaligned_size, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_unaligned_size, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/*
* Simulate a RAM that starts at 0 and allocate down to address 0, which must
* fail as '0' means failure for the lmb_alloc functions.
@@ -417,7 +417,7 @@ static int lib_test_lmb_at_0(struct unit_test_state *uts)
return 0;
}
-DM_TEST(lib_test_lmb_at_0, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_at_0, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Check that calling lmb_reserve with overlapping regions fails. */
static int lib_test_lmb_overlapping_reserve(struct unit_test_state *uts)
@@ -456,7 +456,7 @@ static int lib_test_lmb_overlapping_reserve(struct unit_test_state *uts)
}
DM_TEST(lib_test_lmb_overlapping_reserve,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/*
* Simulate 512 MiB RAM, reserve 3 blocks, allocate addresses in between.
@@ -586,7 +586,7 @@ static int lib_test_lmb_alloc_addr(struct unit_test_state *uts)
return test_alloc_addr(uts, 0xE0000000);
}
-DM_TEST(lib_test_lmb_alloc_addr, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+DM_TEST(lib_test_lmb_alloc_addr, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Simulate 512 MiB RAM, reserve 3 blocks, check addresses in between */
static int test_get_unreserved_size(struct unit_test_state *uts,
@@ -658,4 +658,4 @@ static int lib_test_lmb_get_free_size(struct unit_test_state *uts)
}
DM_TEST(lib_test_lmb_get_free_size,
- DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+ UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);