From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: dtc: Add testcases exercising -Odts mode
Date: Wed, 7 Nov 2007 10:34:06 +1100 [thread overview]
Message-ID: <20071106233406.GJ31367@localhost.localdomain> (raw)
This patch adds a batch of testcases exercising dtc's -Odts mode.
Specifically it checks that using dtc to convert dtb->dts->dtb
preserves the original dtb for a number of example dtb files.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Index: dtc/tests/run_tests.sh
===================================================================
--- dtc.orig/tests/run_tests.sh 2007-11-07 10:23:04.000000000 +1100
+++ dtc/tests/run_tests.sh 2007-11-07 10:27:30.000000000 +1100
@@ -83,7 +83,7 @@
done
# v16 and alternate layout tests
- for tree in test_tree1.dtb; do
+ for tree in test_tree1.dtb sw_tree1.test.dtb; do
for version in 17 16; do
for layout in $ALL_LAYOUTS; do
run_test mangle-layout $tree $version $layout
@@ -94,7 +94,7 @@
done
# Read-write tests
- for basetree in test_tree1.dtb; do
+ for basetree in test_tree1.dtb sw_tree1.test.dtb; do
for version in 17 16; do
for layout in $ALL_LAYOUTS; do
tree=v$version.$layout.$basetree
@@ -126,6 +126,13 @@
run_test dtc.sh -I dts -O dtb -o dtc_escapes.test.dtb escapes.dts
run_test string_escapes dtc_escapes.test.dtb
+
+ # Check -Odts mode preserve all dtb information
+ for tree in test_tree1.dtb dtc_tree1.test.dtb dtc_escapes.test.dtb ; do
+ run_test dtc.sh -I dtb -O dts -o odts_$tree.test.dts $tree
+ run_test dtc.sh -I dts -O dtb -o odts_$tree.test.dtb odts_$tree.test.dts
+ run_test dtbs_equal_ordered $tree odts_$tree.test.dtb
+ done
}
while getopts "vdt:" ARG ; do
@@ -144,7 +151,7 @@
fi
# Make sure we don't have stale blobs lying around
-rm -f *.test.dtb
+rm -f *.test.dtb *.test.dts
for set in $TESTSETS; do
case $set in
Index: dtc/tests/Makefile.tests
===================================================================
--- dtc.orig/tests/Makefile.tests 2007-11-07 10:24:34.000000000 +1100
+++ dtc/tests/Makefile.tests 2007-11-07 10:24:38.000000000 +1100
@@ -23,7 +23,7 @@
TESTS_DEPFILES = $(TESTS:%=%.d) $(TESTS_PREFIX)testutils.d
-TESTS_CLEANFILES_L = *.output vgcore.* *.dtb
+TESTS_CLEANFILES_L = *.output vgcore.* *.dtb *.test.dts
TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
BIN += $(TESTS) $(TESTS_PREFIX)dumptrees
--
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
next reply other threads:[~2007-11-06 23:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 23:34 David Gibson [this message]
2007-11-08 15:26 ` dtc: Add testcases exercising -Odts mode Jon Loeliger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071106233406.GJ31367@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=jdl@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).