summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2021-04-06 08:49:46 +0000
committerPraneeth Bajjuri <praneeth@ti.com>2021-04-09 11:40:42 -0500
commit8c4435324aab4c08a3f43a2358c928d7cc5dc25f (patch)
treeecb1ae10c0871800edbf2aa288104b697c3c7e13 /test
parent1a9e76971811713d9d5891120791402d34e9918d (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 <kishon@ti.com>
Diffstat (limited to 'test')
-rw-r--r--test/dm/core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/dm/core.c b/test/dm/core.c
index 6f380a574c..332ca0f068 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -169,6 +169,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 platdata setting occurs correctly */
static int dm_test_autobind_uclass_pdata_valid(struct unit_test_state *uts)
{