diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-11-20 16:24:23 +1100 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-11-20 09:03:51 -0600 |
commit | 0d6ade254773aa4798fed1b2f1639ea2b8bdeb89 (patch) | |
tree | 35327bd6982564e41a04c13e14d9f74a056c1e30 /checks.c | |
parent | 2cf86939aff2692098396e7f25ce299e7195fa12 (diff) | |
download | dtc-0d6ade254773aa4798fed1b2f1639ea2b8bdeb89.tar.gz |
dtc: Add testcases for tree checks
This patch adds a group of testcases to check that dtc correctly
rejects trees with various structural errors.
To make things easier to test, we change dtc so that failing checks
(as opposed to other errors) result in exit code 2.
This patch also fixes an embarrasing bug uncovered by these new tests:
check_phandles() worked out if the tree's phandles were valid, then
throws that information away and returns success always.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'checks.c')
-rw-r--r-- | checks.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,7 +101,7 @@ static int check_phandles(struct node *root, struct node *node) for_each_child(node, child) ok = ok && check_phandles(root, child); - return 1; + return ok; } int check_structure(struct node *dt) |