From 2a7348129a42f21095fcd62e47a035f78d254130 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 17:36:38 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- .../ddt-runner/files/scripts/p2041rdb/flash | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 recipes-test/ddt-runner/files/scripts/p2041rdb/flash (limited to 'recipes-test/ddt-runner/files/scripts/p2041rdb/flash') diff --git a/recipes-test/ddt-runner/files/scripts/p2041rdb/flash b/recipes-test/ddt-runner/files/scripts/p2041rdb/flash new file mode 100755 index 0000000..2d10600 --- /dev/null +++ b/recipes-test/ddt-runner/files/scripts/p2041rdb/flash @@ -0,0 +1,49 @@ +#!/bin/sh +# +# This script is used to test flash driver functionality. I removed the write +# operations since all partition are in use in p2041rdb and there might be +# possibility of corrupting data even if we backup in test script. + +if part_num=`cat /proc/mtd | grep -c 'mtd'`; then + echo "PASS: show $part_num partitions" +else + echo "FAIL: show $part_num partitions" + exit 1 +fi + +for((part=0; part<$part_num; part++)); +do + if [ $(mtd_debug info /dev/mtd$part | grep -c 'mtd.type') ]; then + echo "PASS: show partition $part debug info" + else + echo "FAIL: show partition $part debug info" + exit 1 + fi +done + +READ_TEST=`find / -name mtd_readtest.ko -print` + +if [ ! -e $READ_TEST ]; then + echo "FAIL: $READ_TEST does not exist" + exit 1 +else + echo "PASS: $READ_TEST exists" +fi + +for((part=0; part<$part_num; part++)); +do + dmesg -c + + insmod $READ_TEST dev=$part + + finish=`dmesg | grep -c 'mtd_readtest: finished'` + if [ $finish -eq 1 ]; then + echo "PASS: read test $part" + else + echo "FAIL: read test $part" + rmmod $READ_TEST + exit 1 + fi + + rmmod $READ_TEST +done -- cgit v1.2.3-54-g00ecf