diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-03 17:25:40 +0300 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-03 17:25:40 +0300 |
commit | 3a814dbfbfb44e8f1805592921b4f39fe0391723 (patch) | |
tree | 3996655f06e2dc4b78fc8e47dac1b77d357f8791 /tests/ubi-tests | |
parent | eab2cfb9ab9abe594469218f00aed54eac0241b2 (diff) |
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 <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'tests/ubi-tests')
-rwxr-xr-x | tests/ubi-tests/stress-test.sh | 10 |
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 ||: |