From ca227f930e41c7598c6cf5b563d65fb6605e306f Mon Sep 17 00:00:00 2001 From: Prakash Surya Date: Thu, 21 Apr 2011 11:10:20 -0700 Subject: [PATCH] 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 --- lustre/tests/test-framework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 1.8.3.1