mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
dm: core: Add tests for oftree_path()
Add a few simple tests for getting the root node, since this is handled as a special case in the implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7071c82bdc
commit
5fe8bc3cf2
1 changed files with 6 additions and 0 deletions
|
@ -228,6 +228,9 @@ static int dm_test_ofnode_read(struct unit_test_state *uts)
|
|||
ofnode node;
|
||||
int size;
|
||||
|
||||
node = oftree_path(oftree_default(), "/");
|
||||
ut_assert(ofnode_valid(node));
|
||||
|
||||
node = ofnode_path("/a-test");
|
||||
ut_assert(ofnode_valid(node));
|
||||
|
||||
|
@ -256,6 +259,9 @@ static int dm_test_ofnode_read_ot(struct unit_test_state *uts)
|
|||
ofnode node;
|
||||
int size;
|
||||
|
||||
node = oftree_path(otree, "/");
|
||||
ut_assert(ofnode_valid(node));
|
||||
|
||||
node = oftree_path(otree, "/node/subnode");
|
||||
ut_assert(ofnode_valid(node));
|
||||
|
||||
|
|
Loading…
Reference in a new issue