summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-03-02 17:12:07 -0800
committerJon Loeliger <jdl@jdl.com>2012-03-07 13:25:03 -0600
commit097ec97c1a35685957210adb93692c3e210bc82c (patch)
tree5331cc1eb4e0706816ef87e67df38786848d6d0b /tests
parenta6e6c60e3a97a6b3a033cd052bb3740fd53cbf4c (diff)
downloaddtc-097ec97c1a35685957210adb93692c3e210bc82c.tar.gz
fdtget: Fix multiple arg bug and add test for it
There is a rather unfortunate bug in fdtget in that if multiple argument sets are provided, it just repeats displaying the first set ones for each set. Fix this bug and add a test for it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fdtget-runtest.sh2
-rwxr-xr-xtests/run_tests.sh3
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/fdtget-runtest.sh b/tests/fdtget-runtest.sh
index dac7f9a..982fbe1 100755
--- a/tests/fdtget-runtest.sh
+++ b/tests/fdtget-runtest.sh
@@ -8,7 +8,7 @@ rm -f $LOG $EXPECT
trap "rm -f $LOG $EXPECT" 0
expect="$1"
-echo $expect >$EXPECT
+echo -e $expect >$EXPECT
shift
verbose_run_log_check "$LOG" $VALGRIND $DTGET "$@"
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index a561433..ac6fa17 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -475,6 +475,9 @@ fdtget_tests () {
run_fdtget_test "61 62 63 0 12 34 0 0 0 a 0 0 0 b 0 0 0 c" \
-thhx $dtb /randomnode mixed
run_wrap_error_test $DTGET -ts $dtb /randomnode doctor-who
+
+ # Test multiple arguments
+ run_fdtget_test "MyBoardName\nmemory" -ts $dtb / model /memory device_type
}
fdtput_tests () {