libfdt: More tests of NOP handling behaviour
In light of the recently discovered bug with NOP handling, this adds some more testcases for NOP handling. Specifically, it adds a helper program which will add a NOP tag after every existing tag in a dtb, and runs the standard battery of tests over trees mangled in this way. For now, this does not add a NOP at the very beginning of the structure block. This causes problems for libfdt at present, because we assume in many places that the root node's BEGIN_NODE tag is at offset 0. I'm still contemplating what to do about this (with one option being simply to declare such dtbs invalid). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
committed by
Jon Loeliger
parent
d8b6942666
commit
a90b5905fe
@@ -125,6 +125,13 @@ libfdt_tests () {
|
||||
tree1_tests rw_tree1.test.dtb
|
||||
tree1_tests_rw rw_tree1.test.dtb
|
||||
|
||||
for basetree in test_tree1.dtb sw_tree1.test.dtb rw_tree1.test.dtb; do
|
||||
run_test nopulate $basetree
|
||||
run_test dtbs_equal_ordered $basetree noppy.$basetree
|
||||
tree1_tests noppy.$basetree
|
||||
tree1_tests_rw noppy.$basetree
|
||||
done
|
||||
|
||||
# Tests for behaviour on various sorts of corrupted trees
|
||||
run_test truncated_property
|
||||
|
||||
|
||||
Reference in New Issue
Block a user