Skip to contentSkip to conversation

dtc: Remove some redundant testcases

PATCH Applied David Gibson 2 participants 2 messages Nov 21, 2007 – Nov 26, 2007

lore
Share & tools
lore
#0 lore raw

This patch removes a number of testcases from the testsuite that are extremely unlikely to find any bugs that won't be found by the other tests. This speeds up the testsuite.

- Both loops across the various tree block layouts run the
tree1_tests on the basic mangled tree. This is completely redundant, so remove the second copy. This removes 456 testcases.

- We currently run tree1_tests on various trees manipulated by
move_and_save. We replace those with just a dtbs_equal_ordered test to check that the manipulated tree is equal to the original. What we're testing here is that fdt_move() operates correctly - it's very unlikely it would succeed well enough for the ordered_equal test to succeed, but the tree1_tests would fail on the result. This removes 162 testcases.

- Currently we re-ordered with mangle-layout both the basic
test_tree1.dtb and sw_tree1.test.dtb. Since we've already checked that these dtbs are equivalent with dtbs_ordered_equal, it's very unlikely that the tests would fail on one but not the other. Therefore reduce this to only using test_tree1.dtb. This removes 828 testcases.

tests/run_tests.sh +5 -6
Index: dtc/tests/run_tests.sh
===================================================================
@@ -76,13 +76,13 @@
     for tree in test_tree1.dtb sw_tree1.test.dtb unfinished_tree1.test.dtb; do
 	rm -f moved.$tree shunted.$tree deshunted.$tree
 	run_test move_and_save $tree
-	tree1_tests moved.$tree
-	tree1_tests shunted.$tree
-	tree1_tests deshunted.$tree
+	run_test dtbs_equal_ordered $tree moved.$tree
+	run_test dtbs_equal_ordered $tree shunted.$tree
+	run_test dtbs_equal_ordered $tree deshunted.$tree
     done
 
     # v16 and alternate layout tests
-    for tree in test_tree1.dtb sw_tree1.test.dtb; do
+    for tree in test_tree1.dtb; do
 	for version in 17 16; do
 	    for layout in $ALL_LAYOUTS; do
 		run_test mangle-layout $tree $version $layout
@@ -93,13 +93,12 @@
     done
 
     # Read-write tests
-    for basetree in test_tree1.dtb sw_tree1.test.dtb; do
+    for basetree in test_tree1.dtb; do
 	for version in 17 16; do
 	    for layout in $ALL_LAYOUTS; do
 		tree=v$version.$layout.$basetree
 		rm -f opened.$tree repacked.$tree
 		run_test open_pack $tree
-		tree1_tests $tree
 		tree1_tests opened.$tree
 		tree1_tests repacked.$tree
 
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 16 lines

This patch removes a number of testcases from the testsuite that are extremely unlikely to find any bugs that won't be found by the other tests. This speeds up the testsuite.

- Both loops across the various tree block layouts run the
tree1_tests on the basic mangled tree. This is completely redundant, so remove the second copy. This removes 456 testcases.

- We currently run tree1_tests on various trees manipulated by
move_and_save. We replace those with just a dtbs_equal_ordered test to check that the manipulated tree is equal to the original. What we're testing here is that fdt_move() operates correctly - it's very unlikely it would succeed well enough for the ordered_equal test to succeed, but the tree1_tests would fail on the result. This removes 162 testcases.

Quoted 6 lines

- Currently we re-ordered with mangle-layout both the basic
test_tree1.dtb and sw_tree1.test.dtb. Since we've already checked that these dtbs are equivalent with dtbs_ordered_equal, it's very unlikely that the tests would fail on one but not the other. Therefore reduce this to only using test_tree1.dtb. This removes 828 testcases.

Applied.

Thanks,
jdl