From 3a814dbfbfb44e8f1805592921b4f39fe0391723 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 3 Aug 2012 17:25:40 +0300 Subject: stress-test.sh: remove a warning If /proc/mtd does not exist, we have this warning: grep: /proc/mtd: No such file or directory Get rid of this. Signed-off-by: Artem Bityutskiy --- tests/ubi-tests/stress-test.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/ubi-tests') diff --git a/tests/ubi-tests/stress-test.sh b/tests/ubi-tests/stress-test.sh index aec5c1c..50c563a 100755 --- a/tests/ubi-tests/stress-test.sh +++ b/tests/ubi-tests/stress-test.sh @@ -153,10 +153,12 @@ fi # Make sure neither mtdram nor nandsim are used nandsim_patt="NAND simulator" mtdram_patt="mtdram test device" -! grep -q "$nandsim_patt" /proc/mtd || - fatal "the nandsim driver is already used" -! grep -q "$mtdram_patt" /proc/mtd || - fatal "the mtdram driver is already used" +if [ -e /proc/mtd ]; then + ! grep -q "$nandsim_patt" /proc/mtd || + fatal "the nandsim driver is already used" + ! grep -q "$mtdram_patt" /proc/mtd || + fatal "the mtdram driver is already used" +fi rmmod ubi >/dev/null 2>&1 ||: -- cgit v1.2.3