From 92479eca2ed5e1871b2660af280917e4d61bdba8 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Wed, 19 Nov 2014 13:10:10 -0800 Subject: [PATCH] LU-5932 tests: load sunrpc module before insmod ptlrpc_gss Lustre ptlrpc_gss module depends on Linux kernel sunrpc module. This patch fixes load_module() in test-framework.sh to load the sunrpc module before loading ptlrpc_gss module by using insmod. Signed-off-by: Jian Yu Change-Id: Idf22fa9023a2fada9038e16fbc3e8a61530266bc Reviewed-on: http://review.whamcloud.com/12790 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 43d0b93..bfdc9c2 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -416,22 +416,24 @@ load_module() { [ $# -gt 0 ] && echo "${module} options: '$*'" - # Note that insmod will ignore anything in modprobe.conf, which is why we're - # passing options on the command-line. - if [ "$BASE" == "lnet_selftest" ] && \ - [ -f ${LUSTRE}/../lnet/selftest/${module}${EXT} ]; then - insmod ${LUSTRE}/../lnet/selftest/${module}${EXT} - elif [ -f ${LUSTRE}/${module}${EXT} ]; then - insmod ${LUSTRE}/${module}${EXT} "$@" - else - # must be testing a "make install" or "rpm" installation - # note failed to load ptlrpc_gss is considered not fatal - if [ "$BASE" == "ptlrpc_gss" ]; then - modprobe $BASE "$@" 2>/dev/null || echo "gss/krb5 is not supported" - else - modprobe $BASE "$@" - fi - fi + # Note that insmod will ignore anything in modprobe.conf, which is why + # we're passing options on the command-line. + if [[ "$BASE" == "lnet_selftest" ]] && + [[ -f ${LUSTRE}/../lnet/selftest/${module}${EXT} ]]; then + insmod ${LUSTRE}/../lnet/selftest/${module}${EXT} + elif [[ -f ${LUSTRE}/${module}${EXT} ]]; then + [[ "$BASE" != "ptlrpc_gss" ]] || modprobe sunrpc + insmod ${LUSTRE}/${module}${EXT} "$@" + else + # must be testing a "make install" or "rpm" installation + # note failed to load ptlrpc_gss is considered not fatal + if [[ "$BASE" == "ptlrpc_gss" ]]; then + modprobe $BASE "$@" 2>/dev/null || + echo "gss/krb5 is not supported" + else + modprobe $BASE "$@" + fi + fi } llite_lloop_enabled() { -- 1.8.3.1