aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/ubi-tests/stress-test.sh10
1 files changed, 6 insertions, 4 deletions
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 ||: