From 5d8de1fabf740eda724ad2e9eb40c3b57322b9e4 Mon Sep 17 00:00:00 2001 From: Emoly Liu Date: Mon, 21 Apr 2014 07:09:04 +0800 Subject: [PATCH] LU-4441 test: improve run-llog.sh to print more information Improve run-llog.sh script so that it can print more useful information when "Module llog_test is in use" happens again. Signed-off-by: Emoly Liu Change-Id: Id07e253a6f22b6a7235ab6d41a30fe701286f8d7 Reviewed-on: http://review.whamcloud.com/9966 Tested-by: Jenkins Reviewed-by: Jian Yu Tested-by: Maloo Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- lustre/tests/run-llog.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/lustre/tests/run-llog.sh b/lustre/tests/run-llog.sh index 81c0e24..58bc5a4 100644 --- a/lustre/tests/run-llog.sh +++ b/lustre/tests/run-llog.sh @@ -1,6 +1,9 @@ #!/bin/bash LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)} +. $LUSTRE/tests/test-framework.sh +init_test_env $@ +. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} load_llog_test() { grep -q llog_test /proc/modules && return @@ -15,30 +18,28 @@ load_llog_test() { return } -PATH=`dirname $0`:$LUSTRE/utils:$PATH +PATH=$(dirname $0):$LUSTRE/utils:$PATH TMP=${TMP:-/tmp} -MGS=`lctl dl | awk '/mgs/ { print $4 }'` +set -x +MGS=$($LCTL dl | awk '/mgs/ { print $4 }') [ -z "$MGS" ] && echo "$0: SKIP: no MGS available, skipping llog test" && exit 0 load_llog_test || exit 0 -lctl modules > $TMP/ogdb-`hostname` +$LCTL modules > $TMP/ogdb-$(hostname) echo "NOW reload debugging syms.." RC=0 -lctl <