From: Prakash Surya Date: Thu, 21 Apr 2011 18:10:20 +0000 (-0700) Subject: LU-336 Tighten matching criteria in module_loaded X-Git-Tag: 2.0.62.0~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ca227f930e41c7598c6cf5b563d65fb6605e306f;p=fs%2Flustre-release.git LU-336 Tighten matching criteria in module_loaded The function module_loaded can easily produce false positives because of it's lenient way of grep'ing the output of lsmod. Tightening up the criteria upon which it uses to determine if a module is loaded, reduces the risk of returning these false positives. Signed-off-by: Prakash Surya Change-Id: Id8a20bf568be275eeb3ef466cb3fd051f8389b44 Reviewed-on: http://review.whamcloud.com/558 Tested-by: Hudson Reviewed-by: Andreas Dilger Reviewed-by: Yu Jian Reviewed-by: Brian J. Murrell --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index e200b89..6fbddd6 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -265,7 +265,7 @@ esac module_loaded () { - /sbin/lsmod | grep -q $1 + /sbin/lsmod | grep -q "^\<$1\>" } # Load a module on the system where this is running.