Whamcloud - gitweb
LU-425 tests: fix the issue of using "grep -w"
authorYu Jian <yujian@whamcloud.com>
Wed, 16 May 2012 08:19:00 +0000 (16:19 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 May 2012 02:49:07 +0000 (22:49 -0400)
commitdba14d1e6cef9fff578e577e5f2b0ce233683910
tree60faafb227d29ca2ada06e993e83d82d5195924f
parentc67b2005738a7d39fc6d3b2f0b228500ee754e46
LU-425 tests: fix the issue of using "grep -w"

This patch fixes the following issue while using "grep -w"
to do exact match:

$ echo /mnt/nbp0-2 | grep -w /mnt/nbp0
/mnt/nbp0-2

Per the description of "-w" option:
-w, --word-regexp
Select only those lines containing matches that form whole words.
The test is that the matching substring must either be at the
beginning of the line, or preceded by a non-word constituent
character. Similarly, it must be either at the end of the line
or followed by a non-word constituent character. Word-constituent
characters are letters, digits, and the underscore.

So, the hyphen "-" character is a non-word constituent character
and "grep -w" does not do exact match on strings which contain it.

Signed-off-by: Yu Jian <yujian@whamcloud.com>
Change-Id: I61e611aad78748ad1e6362c7df3e0792e2766016
Reviewed-on: http://review.whamcloud.com/2801
Tested-by: Hudson
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/acceptance-small.sh
lustre/tests/auster
lustre/tests/replay-dual.sh
lustre/tests/test-framework.sh