[3/5] core/device: add test for dt_new() a duplicate node

Message ID 20181010051950.13202-4-stewart@linux.ibm.com
State Accepted
Headers show
Series
  • Small code coverage improvements
Related show

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied

Commit Message

Stewart Smith Oct. 10, 2018, 5:19 a.m.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 core/test/run-device.c | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/core/test/run-device.c b/core/test/run-device.c
index c317d4cc76f3..727b14fffe43 100644
--- a/core/test/run-device.c
+++ b/core/test/run-device.c
@@ -122,6 +122,7 @@  int main(void)
 	check_path(c1, "/c1");
 	assert(dt_find_by_name(root, "c1") == c1);
 	assert(dt_find_by_path(root, "/c1") == c1);
+	assert(dt_new(root, "c1") == NULL);
 
 	c2 = dt_new(root, "c2");
 	assert(!list_top(&c2->properties, struct dt_property, list));