Whamcloud - gitweb
LU-425 tests: fix the issue of using "grep -w"
authorYu Jian <yujian@whamcloud.com>
Fri, 13 Apr 2012 06:33:48 +0000 (14:33 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 7 May 2012 19:00:09 +0000 (15:00 -0400)
commitf05ca36e8c6920c435d5426b67ce5d13f9bf772b
treea2eddb63d7d042b904d6e55c9b7c2f6147887f08
parent81b8dc81c5fe85278656ab12dc84389aed54b244
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: I53d306d38b05408c351db10dc545120f2f9dabce
Reviewed-on: http://review.whamcloud.com/2529
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.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