From 877504a823195b33b9cea74ced19492b91e2a0ed Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 3 Aug 2012 10:11:02 +0300 Subject: stress-test.sh: do not use pipe unnecessarily Use 'grep patt file' instead of cat file | grep patt. Signed-off-by: Artem Bityutskiy --- tests/ubi-tests/stress-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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 ||: -- cgit v1.2.3