dtc: Test and fix conversion to/from old dtb versions

This patch adds testcases which test dtc when used to convert between
different dtb versions.  These tests uncovered a couple of bugs
handling old dtb versions, which are also fixed.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2008-02-28 20:55:37 +11:00 committed by Jon Loeliger
parent d028e84140
commit a266e5c1e1
2 changed files with 19 additions and 8 deletions

View file

@ -172,6 +172,19 @@ dtc_tests () {
run_test dtbs_equal_ordered $tree odts_$tree.test.dtb
done
# Check version conversions
for tree in test_tree1.dtb ; do
for aver in 1 2 3 16 17; do
atree="ov${aver}_$tree.test.dtb"
run_test dtc.sh -I dtb -O dtb -V$aver -o $atree $tree
for bver in 16 17; do
btree="ov${bver}_$atree"
run_test dtc.sh -I dtb -O dtb -V$bver -o $btree $atree
run_test dtbs_equal_ordered $btree $tree
done
done
done
# Check some checks
run_test dtc-checkfails.sh duplicate_node_names -- -I dts -O dtb dup-nodename.dts
run_test dtc-checkfails.sh duplicate_property_names -- -I dts -O dtb dup-propname.dts