[Skiboot] [PATCH 5/5] core/device: Test dt_new_check()
Stewart Smith
stewart at linux.ibm.com
Wed Oct 10 16:19:50 AEDT 2018
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
core/test/run-device.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/core/test/run-device.c b/core/test/run-device.c
index 076ec2489def..287d5a8747f0 100644
--- a/core/test/run-device.c
+++ b/core/test/run-device.c
@@ -103,7 +103,7 @@ const char **props_to_fix(struct dt_node *node)
int main(void)
{
- struct dt_node *root, *other_root, *c1, *c2, *gc1, *gc2, *gc3, *ggc1, *ggc2;
+ struct dt_node *root, *other_root, *c1, *c2, *c2_c, *gc1, *gc2, *gc3, *ggc1, *ggc2;
struct dt_node *addrs, *addr1, *addr2;
struct dt_node *i, *subtree, *ev1, *ut1, *ut2;
const struct dt_property *p;
@@ -117,7 +117,7 @@ int main(void)
assert(!list_top(&root->properties, struct dt_property, list));
check_path(root, "/");
- c1 = dt_new(root, "c1");
+ c1 = dt_new_check(root, "c1");
assert(!list_top(&c1->properties, struct dt_property, list));
check_path(c1, "/c1");
assert(dt_find_by_name(root, "c1") == c1);
@@ -125,6 +125,8 @@ int main(void)
assert(dt_new(root, "c1") == NULL);
c2 = dt_new(root, "c2");
+ c2_c = dt_new_check(root, "c2");
+ assert(c2 == c2_c);
assert(!list_top(&c2->properties, struct dt_property, list));
check_path(c2, "/c2");
assert(dt_find_by_name(root, "c2") == c2);
--
2.17.1
More information about the Skiboot
mailing list