mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-08 12:45:29 -05:00
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>
This commit is contained in:
parent
2cf86939af
commit
0d6ade2547
11 changed files with 90 additions and 21 deletions
|
|
@ -142,6 +142,12 @@ dtc_tests () {
|
|||
run_test dtbs_equal_ordered $tree odts_$tree.test.dtb
|
||||
done
|
||||
|
||||
# Check some checks
|
||||
run_test dtc-checkfails.sh -I dts -O dtb dup-nodename.dts
|
||||
run_test dtc-checkfails.sh -I dts -O dtb dup-propname.dts
|
||||
run_test dtc-checkfails.sh -I dts -O dtb dup-phandle.dts
|
||||
run_test dtc-checkfails.sh -I dts -O dtb zero-phandle.dts
|
||||
run_test dtc-checkfails.sh -I dts -O dtb minusone-phandle.dts
|
||||
}
|
||||
|
||||
while getopts "vdt:" ARG ; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue