Whamcloud - gitweb
LU-356 adding verbose option in test-framework
authorhongchao.zhang <hongchao.zhang@whamcloud.com>
Wed, 11 May 2011 06:54:48 +0000 (14:54 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 31 May 2011 16:08:25 +0000 (09:08 -0700)
in test-framework.sh, using the VERBOSE value if it's set by user,
in do_node and do_nodes, fixing the problem of only printing part of
the command during using "lctl mark" to print debug info.

Change-Id: If6444b322849d5f11a8c1f678de0eb7b80398480
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/862
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index d9c6d13..e200b89 100644 (file)
@@ -8,7 +8,7 @@ set -e
 
 export REFORMAT=${REFORMAT:-""}
 export WRITECONF=${WRITECONF:-""}
-export VERBOSE=false
+export VERBOSE=${VERBOSE:-false}
 export CATASTROPHE=${CATASTROPHE:-/proc/sys/lnet/catastrophe}
 export GSS=false
 export GSS_KRB5=false
@@ -1675,7 +1675,7 @@ do_node() {
     fi
     if $VERBOSE; then
         echo "CMD: $HOST $@" >&2
-        $myPDSH $HOST $LCTL mark "$@" > /dev/null 2>&1 || :
+        $myPDSH $HOST "$LCTL mark \"$@\"" > /dev/null 2>&1 || :
     fi
 
     if [ "$myPDSH" = "rsh" ]; then
@@ -1749,7 +1749,7 @@ do_nodes() {
 
     if $VERBOSE; then
         echo "CMD: $rnodes $@" >&2
-        $myPDSH $rnodes $LCTL mark "$@" > /dev/null 2>&1 || :
+        $myPDSH $rnodes "$LCTL mark \"$@\"" > /dev/null 2>&1 || :
     fi
 
     # do not replace anything from pdsh output if -N is used