diff options
| author | Kishon Vijay Abraham I <[email protected]> | 2021-07-21 21:28:31 +0530 |
|---|---|---|
| committer | Lokesh Vutla <[email protected]> | 2021-07-27 10:56:53 +0530 |
| commit | 9f6ae6dec2d565b08314bbd56caa797b1df438ee (patch) | |
| tree | 9c7254e0ab27b23006d9ae540f59a29ebdec8ddc | |
| parent | 77cbaf8837fd096b876d8a6c05d90683f5f4b82e (diff) | |
dm: test: Add test case to check node name ignoring unit address
Add test to check node name ignoring unit address.
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
| -rw-r--r-- | test/dm/core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dm/core.c b/test/dm/core.c index 0492698997c..48e66b73335 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -177,6 +177,20 @@ static int dm_test_autobind_uclass_pdata_alloc(struct unit_test_state *uts) } DM_TEST(dm_test_autobind_uclass_pdata_alloc, UT_TESTF_SCAN_PDATA); +/* compare node names ignoring the unit address */ +static int dm_test_compare_node_name(struct unit_test_state *uts) +{ + ofnode node; + + node = ofnode_path("/mmio-bus@0"); + ut_assert(ofnode_valid(node)); + ut_assert(ofnode_name_eq(node, "mmio-bus")); + + return 0; +} + +DM_TEST(dm_test_compare_node_name, UT_TESTF_SCAN_PDATA); + /* Test that binding with uclass plat setting occurs correctly */ static int dm_test_autobind_uclass_pdata_valid(struct unit_test_state *uts) { |
