From: Oleg Drokin Date: Tue, 7 Nov 2017 00:59:20 +0000 (-0500) Subject: LU-10201 tests: Fix overly greedy grep in conf_sanity test 20 X-Git-Tag: 2.10.58~87 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=d649aad0adfc27d7a02ce62c91d35430177719c4;p=fs%2Flustre-release.git LU-10201 tests: Fix overly greedy grep in conf_sanity test 20 Need to better ensure the mountpoint matching so that only /mnt/lustre is mtched, but not /mnt/lustre-{mds,ost} Change-Id: I0ca274a358de3a38542e05bb5682641459fea93d Signed-off-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/29957 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo --- diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 14255b3..441c1e8 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -730,7 +730,7 @@ test_20() { [ -e $DIR/$tfile ] && error "$DIR/$tfile exists incorrectly" remount_client rw $MOUNT || error "remount_client with rw failed" touch $DIR/$tfile || error "touch $DIR/$tfile failed" - MCNT=$(grep -c $MOUNT /etc/mtab) + MCNT=$(grep -c $MOUNT' ' /etc/mtab) [ "$MCNT" -ne 1 ] && error "$MOUNT in /etc/mtab $MCNT times" umount_client $MOUNT stop_mds || error "Unable to stop MDS"