Skip to contentSkip to conversation

dtc: Add a testcase for 'reg' or 'ranges' in /

PATCH Applied David Gibson 2 participants 2 messages May 30, 2008 – Jun 2, 2008

lore
Share & tools
lore
#0 lore raw

This patch adds an extra testcase to dtc to ensure that the "reg_format" and "ranges_format" checks trigger as they should if a 'reg' or 'ranges' property appears in the root node.

tests/reg-ranges-root.dts new file +8 -0
Index: dtc/tests/reg-ranges-root.dts
===================================================================
@@ -0,0 +1,8 @@
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+	reg = <0x1000 0x10>;
+	ranges = <0x1000 0x2000 0x1000>;
+};
tests/run_tests.sh +1 -0
Index: dtc/tests/run_tests.sh
===================================================================
@@ -249,6 +249,7 @@ dtc_tests () {
     run_sh_test dtc-checkfails.sh device_type_is_string model_is_string status_is_string -- -I dts -O dtb bad-string-props.dts
     run_sh_test dtc-checkfails.sh reg_format ranges_format -- -I dts -O dtb bad-reg-ranges.dts
     run_sh_test dtc-checkfails.sh ranges_format -- -I dts -O dtb bad-empty-ranges.dts
+    run_sh_test dtc-checkfails.sh reg_format ranges_format -- -I dts -O dtb reg-ranges-root.dts
     run_sh_test dtc-checkfails.sh avoid_default_addr_size -- -I dts -O dtb default-addr-size.dts
     run_sh_test dtc-checkfails.sh obsolete_chosen_interrupt_controller -- -I dts -O dtb obsolete-chosen-interrupt-controller.dts
     run_sh_test dtc-checkfails.sh node_name_chars -- -I dtb -O dtb bad_node_char.dtb
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw
Quoted 5 lines

This patch adds an extra testcase to dtc to ensure that the "reg_format" and "ranges_format" checks trigger as they should if a 'reg' or 'ranges' property appears in the root node.

Applied.

Thanks,
jdl