Skip to contentSkip to conversation

dtc: Better exercise dtc base and bytestring features

PATCH Applied David Gibson 2 participants 2 messages Nov 6, 2007 – Nov 8, 2007

lore
Share & tools
lore
#0 lore raw

This patch alters the main testcase, and the dts file corresponding to it so that we at least trivially exercise dtc's bytestring and base conversion features.

tests/test_tree1.dts +5 -5
Index: dtc/tests/test_tree1.dts
===================================================================
@@ -1,5 +1,5 @@
 /memreserve/ deadbeef00000000-deadbeef000fffff;
-/memreserve/ abcd1234 00001234;
+/memreserve/ 75bcd15 1000;
 
 / {
 	compatible = "test_tree1";
@@ -8,20 +8,20 @@
 
 	subnode@1 {
 		compatible = "subnode1";
-		prop-int = <deadbeef>;
+		prop-int = [deadbeef];
 
 		subsubnode {
 			compatible = "subsubnode1", "subsubnode";
-			prop-int = <deadbeef>;
+			prop-int = <h# deadbeef>;
 		};
 	};
 
 	subnode@2 {
-		prop-int = <abcd1234>;
+		prop-int = <d# 123456789>;
 
 		subsubnode@0 {
 			compatible = "subsubnode2", "subsubnode";
-			prop-int = <abcd1234>;
+			prop-int = <o# 0726746425>;
 		};
 	};
 };
tests/testdata.h +3 -3
Index: dtc/tests/testdata.h
===================================================================
@@ -17,11 +17,11 @@
 
 #define TEST_ADDR_1	ASM_CONST_LL(0xdeadbeef00000000)
 #define TEST_SIZE_1	ASM_CONST_LL(0x100000)
-#define TEST_ADDR_2	ASM_CONST_LL(0xabcd1234)
-#define TEST_SIZE_2	ASM_CONST_LL(0x1234)
+#define TEST_ADDR_2	ASM_CONST_LL(123456789)
+#define TEST_SIZE_2	ASM_CONST_LL(010000)
 
 #define TEST_VALUE_1	cell_to_fdt(0xdeadbeef)
-#define TEST_VALUE_2	cell_to_fdt(0xabcd1234)
+#define TEST_VALUE_2	cell_to_fdt(123456789)
 
 #define TEST_STRING_1	"hello world"
 #define TEST_STRING_2	"nastystring: \a\b\t\n\v\f\r\\\""
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

So, like, the other day David Gibson mumbled:

Quoted 5 lines

This patch alters the main testcase, and the dts file corresponding to it so that we at least trivially exercise dtc's bytestring and base conversion features.

Applied.

jdl