From cd3411088f6bb4393d79c50b5f7eef3f11a83435 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 00:31:33 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../ddt-runner/files/scripts/bsc9132qds/flash | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 recipes-test/ddt-runner/files/scripts/bsc9132qds/flash (limited to 'recipes-test/ddt-runner/files/scripts/bsc9132qds/flash') diff --git a/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash b/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash new file mode 100755 index 0000000..66631ba --- /dev/null +++ b/recipes-test/ddt-runner/files/scripts/bsc9132qds/flash @@ -0,0 +1,48 @@ +#!/bin/sh +# +# This script is used to test flash driver functionality. I removed the tests +# which include write operations since all partition are in use in bsc9131rdb +# 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: $part_num partitions found" +else + echo "FAIL: $part_num partitions found" + 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 > NULL + + modprobe $READ_TEST dev=$part + + bad_num=`dmesg | grep -c 'bad'` + if [ $bad_num -eq 0 ]; then + echo "PASS: read test for partition $part" + else + echo "FAIL: read test for partition $part" + fi + + rmmod $READ_TEST +done -- cgit v1.2.3-54-g00ecf