summaryrefslogtreecommitdiff
path: root/tests/test_tree1_wrong7.dts
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2010-04-30 15:30:00 +1000
committerJon Loeliger <jdl@jdl.com>2010-04-30 08:36:54 -0500
commite3b32b75b54834bc4d55db22636b6504eabb788e (patch)
tree77deaf51fafdce9a41c344e1a37e2aa4b6b5e3e8 /tests/test_tree1_wrong7.dts
parent341df2bdc3f9664587a57f947249c3208da77c9b (diff)
downloaddtc-e3b32b75b54834bc4d55db22636b6504eabb788e.tar.gz
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>
Diffstat (limited to 'tests/test_tree1_wrong7.dts')
-rw-r--r--tests/test_tree1_wrong7.dts39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/test_tree1_wrong7.dts b/tests/test_tree1_wrong7.dts
new file mode 100644
index 0000000..f57ace0
--- /dev/null
+++ b/tests/test_tree1_wrong7.dts
@@ -0,0 +1,39 @@
+/dts-v1/;
+
+/memreserve/ 0xdeadbeef00000000 0x100000;
+/memreserve/ 123456789 010000;
+
+/ {
+ compatible = "test_tree1";
+ prop-int = <0xdeadbeef>;
+ prop-str = "hello world";
+
+ subnode@1 {
+ compatible = "subnode1";
+ prop-int = [deadbeef];
+
+ subsubnode {
+ compatible = "subsubnode1", "subsubnode";
+ prop-int = <0xdeadbeef>;
+ };
+
+ ss1 {
+ };
+ };
+
+ subnode@2 {
+ linux,phandle = <0x2000>;
+ prop-int = <123456789>;
+
+ subsubnode@0 {
+ phandle = <0x2001>;
+ compatible = "subsubnode2", "subsubnode";
+ prop-int = <0726746425>;
+ };
+
+ ss2 {
+ extranode {
+ };
+ };
+ };
+};