platform_external_dtc/tests
David Gibson e3b32b75b5 dtc: Extend and better test dtbs_equal utility programs (resend)
The dtbs_equal_ordered test program is used to implement a number of
testcases.  However, the test program itself has never been
particularly well tested.  In addition there are testcases coming in
future for which it would be useful to have a corresponding
"dtbs_equal_unordered" which checks for equality of device trees, not
considering the internal ordering of elements.  Finally, for some
tests we may want it would be useful to check trees for equality with
the PASS case being when they are *not* equal.

This patch addresses all of the above.  A dtbs_equal_unordered is
added, and both it and the existing dtbs_equal_ordered program now
take a -n option to make the PASS case be where the trees are not
equal.  A number of example trees with slight modifications from
test_tree1 are used to verify that both these programs correctly
identify when the tree is altered, and a dtb_reverse program is used
to verify that the unordered version does not depend on internal
ordering.  These new testcases for the equality testing programs are
split out into a new test group in run_tests.sh.

dtbs_equal_unordered uses the new property iteration functions, and so
this also acts as further testing for those functions.
dtbs_equal_unordered will be useful for further testing the recently
added tree-merging code and its upcoming extensions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2010-04-30 08:36:54 -05:00
..
.gitignore Update .gitignore files 2010-02-25 11:47:58 -06:00
add_subnode_with_nops.c libfdt: Fix NOP handling bug in fdt_add_subnode_namelen() 2008-02-14 08:02:41 -06:00
aliases.dts libfdt: Add support for using aliases in fdt_path_offset() 2008-08-14 10:24:58 -05:00
asm_tree_dump.c dtc: Make asm output more portable and add testcases 2009-02-03 08:38:01 -06:00
bad-empty-ranges.dts dtc: Convert #address-cells and #size-cells related checks 2007-12-07 07:43:45 -06:00
bad-name-property.dts dtc: Convert "name" property checking to new infrastructure 2007-12-05 08:27:28 -06:00
bad-ncells.dts dtc: Migrate "one cell" checks to new framework 2007-12-06 09:15:56 -06:00
bad-reg-ranges.dts dtc: Convert #address-cells and #size-cells related checks 2007-12-07 07:43:45 -06:00
bad-string-props.dts dtc: Migrate "string property" checks to new framework 2007-12-06 09:16:28 -06:00
base01.asm Add some initial test cases. 2007-02-15 11:02:44 -06:00
base01.cmd Add some initial test cases. 2007-02-15 11:02:44 -06:00
base01.dts Remove support for the legacy DTS source file format. 2008-10-03 16:09:34 -05:00
base01.stderr Add some initial test cases. 2007-02-15 11:02:44 -06:00
boot-cpuid.c dtc: Rework handling of boot_cpuid_phys 2008-05-19 14:12:15 -05:00
boot-cpuid.dts dtc: Automatically pick a sensible boot_cpuid_phys 2010-02-19 08:36:23 -06:00
comments-cmp.dts dtc: Fold comment handling test into testsuite 2008-02-15 08:10:14 -06:00
comments.dts dtc: Fold comment handling test into testsuite 2008-02-15 08:10:14 -06:00
data.S dtc: Make asm output more portable and add testcases 2009-02-03 08:38:01 -06:00
default-addr-size.dts dtc: Convert #address-cells and #size-cells related checks 2007-12-07 07:43:45 -06:00
del_node.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
del_property.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
dtb_reverse.c dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
dtbs_equal_ordered.c dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
dtbs_equal_unordered.c dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
dtc-checkfails.sh dtc: Remove some small bashisms from test scripts 2008-05-29 08:16:03 -05:00
dtc-fatal.sh dtc: Remove some small bashisms from test scripts 2008-05-29 08:16:03 -05:00
dumptrees.c dtc: Implement checks for the format of node and property names 2008-03-23 08:00:32 -05:00
dup-nodename.dts dtc: Add testcases for tree checks 2007-11-20 09:03:51 -06:00
dup-phandle.dts dtc: Add testcases for tree checks 2007-11-20 09:03:51 -06:00
dup-propname.dts dtc: Add testcases for tree checks 2007-11-20 09:03:51 -06:00
empty.dts Remove support for the legacy DTS source file format. 2008-10-03 16:09:34 -05:00
escapes.dts Remove support for the legacy DTS source file format. 2008-10-03 16:09:34 -05:00
extra-terminating-null.c dtc: Enable more warnings 2010-03-10 08:12:28 -06:00
extra-terminating-null.dts Fix bug in -Odts with properties containing multiple terminating nulls 2009-11-11 07:34:01 -06:00
find_property.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
get_alias.c dtc: Enable more warnings 2010-03-10 08:12:28 -06:00
get_mem_rsv.c dtc: Restore missing code for testcases 2007-10-17 07:09:59 -05:00
get_name.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
get_path.c libfdt: Fix bugs in fdt_get_path() 2008-09-25 09:34:27 -05:00
get_phandle.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
getprop.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
incbin.bin dtc: Add support for binary includes. 2008-06-19 10:01:14 -05:00
incbin.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
incbin.dts dtc: Add support for binary includes. 2008-06-19 10:01:14 -05:00
include0.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include1.dts Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
include2.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include3.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include4.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include5.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include6.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
include7.dts libfdt: Fix bug in fdt_subnode_offset_namelen() 2008-11-05 08:12:10 -06:00
include8.dts dtc: Testcase for /include/ directive 2008-07-14 12:07:14 -05:00
label01.dts Remove support for the legacy DTS source file format. 2008-10-03 16:09:34 -05:00
Makefile.tests dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
mangle-layout.c dtc: Audit and fix valgrind errors 2010-02-24 08:50:25 -06:00
mangle-layout.supp dtc: Assorted improvements to test harness 2008-03-23 08:00:33 -05:00
minusone-phandle.dts dtc: Add testcases for tree checks 2007-11-20 09:03:51 -06:00
move_and_save.c dtc: Enable and fix -Wpointer-arith warnings 2008-07-14 12:36:08 -05:00
multilabel.dts Allow device tree to be modified by additonal device tree sections 2010-02-25 11:46:01 -06:00
multilabel_merge.dts Allow device tree to be modified by additonal device tree sections 2010-02-25 11:46:01 -06:00
node_check_compatible.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
node_offset_by_compatible.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
node_offset_by_phandle.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
node_offset_by_prop_value.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
nonexist-label-ref.dts dtc: Flexible tree checking infrastructure (v2) 2007-11-26 16:00:08 -06:00
nonexist-node-ref.dts dtc: Fix some lexical problems with references 2007-11-28 13:51:38 -06:00
nop_node.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
nop_property.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
nopulate.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
notfound.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
obsolete-chosen-interrupt-controller.dts dtc: Convert check for obsolete /chosen property 2007-12-07 07:43:53 -06:00
open_pack.c dtc: Audit and fix valgrind errors 2010-02-24 08:50:25 -06:00
open_pack.supp dtc: Assorted improvements to test harness 2008-03-23 08:00:33 -05:00
parent_offset.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
path-references.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
path-references.dts dtc: Implement path references 2007-12-05 08:28:44 -06:00
path_offset.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
path_offset_aliases.c dtc: Enable more warnings 2010-03-10 08:12:28 -06:00
phandle_format.c Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
prop-after-subnode.dts dtc: Generate useful error message for properties after subnodes 2007-12-05 08:27:46 -06:00
references.c dtc: Handle linux,phandle properties which self-reference 2008-11-17 14:05:48 -06:00
references.dts Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
reg-ranges-root.dts dtc: Add a testcase for 'reg' or 'ranges' in / 2008-06-02 15:20:08 -05:00
reuse-label.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label1.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label2.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label3.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label4.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label5.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
reuse-label6.dts Disallow re-use of the same label within a dts file 2010-02-23 09:04:48 -06:00
root_node.c libfdt: Abolish fdt_offset_ptr_typed() 2007-11-20 09:01:29 -06:00
run_tests.sh dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
rw_tree1.c libfdt: Fix bug in fdt_subnode_offset_namelen() 2008-11-05 08:12:10 -06:00
set_name.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
setprop.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
setprop_inplace.c libfdt: Abolish _typed() variants, add _cell() variants 2007-11-20 09:00:37 -06:00
string_escapes.c dtc: Improve -Odts output 2007-10-17 07:14:38 -05:00
subnode_offset.c libfdt: Fix bug in fdt_subnode_offset_namelen() 2008-11-05 08:12:10 -06:00
supernode_atdepth_offset.c dtc: Make many functions 'static' 2008-08-13 13:04:39 -05:00
sw_tree1.c Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
test01.asm Add some initial test cases. 2007-02-15 11:02:44 -06:00
test01.dts Remove support for the legacy DTS source file format. 2008-10-03 16:09:34 -05:00
test01.stderr Add some initial test cases. 2007-02-15 11:02:44 -06:00
test_kernel_dts Add a script that compares an "old" and "new" dtc results. 2007-11-20 09:14:03 -06:00
test_tree1.dts Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
test_tree1_dts0.dts libfdt: Fix bug in fdt_subnode_offset_namelen() 2008-11-05 08:12:10 -06:00
test_tree1_merge.dts Allow device tree to be modified by additonal device tree sections 2010-02-25 11:46:01 -06:00
test_tree1_wrong1.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong2.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong3.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong4.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong5.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong6.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong7.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong8.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
test_tree1_wrong9.dts dtc: Extend and better test dtbs_equal utility programs (resend) 2010-04-30 08:36:54 -05:00
testdata.h dtc: Address an assortment of portability problems 2008-07-14 12:21:18 -05:00
tests.h dtc: Add testcases for labels within values 2009-02-03 08:38:05 -06:00
tests.sh dtc: Remove some small bashisms from test scripts 2008-05-29 08:16:03 -05:00
testutils.c dtc: Enable and fix -Wpointer-arith warnings 2008-07-14 12:36:08 -05:00
trees.S Support ePAPR compliant phandle properties 2009-11-26 15:06:17 -06:00
truncated_property.c dtc: Optimise by default, fix warnings thus uncovered 2007-08-31 08:34:18 -05:00
value-labels.c dtc: Enable more warnings 2010-03-10 08:12:28 -06:00
value-labels.dts dtc: Add testcases for labels within values 2009-02-03 08:38:05 -06:00
zero-phandle.dts dtc: Add testcases for tree checks 2007-11-20 09:03:51 -06:00