summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/stress-test.sh
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-08-03 10:11:02 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-08-03 10:11:02 +0300
commit877504a823195b33b9cea74ced19492b91e2a0ed (patch)
tree836186cf568fefb5f3ba32358c9c95b66a79ab23 /tests/ubi-tests/stress-test.sh
parent1504e9c9d305e2ad24f0bba57e37eb18a18ddc4e (diff)
stress-test.sh: do not use pipe unnecessarily
Use 'grep patt file' instead of cat file | grep patt. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'tests/ubi-tests/stress-test.sh')
-rwxr-xr-xtests/ubi-tests/stress-test.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ubi-tests/stress-test.sh b/tests/ubi-tests/stress-test.sh
index ad9a2af..c92525e 100755
--- a/tests/ubi-tests/stress-test.sh
+++ b/tests/ubi-tests/stress-test.sh
@@ -62,9 +62,9 @@ fi
# Make sure neither mtdram nor nandsim are used
nandsim_patt="NAND simulator"
mtdram_patt="mtdram test device"
-! cat /proc/mtd | grep -q "$nandsim_patt" ||
+! grep -q "$nandsim_patt" /proc/mtd ||
fatal "the nandsim driver is already used"
-! cat /proc/mtd | grep -q "$mtdram_patt" ||
+! grep -q "$mtdram_patt" /proc/mtd ||
fatal "the mtdram driver is already used"
rmmod ubi >/dev/null 2>&1 ||: