From: hongchao.zhang Date: Wed, 11 May 2011 06:54:48 +0000 (+0800) Subject: LU-356 adding verbose option in test-framework X-Git-Tag: 2.0.62.0~20 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1bc0e1522b4431be58ac86fe4b992c996e38a06c;ds=sidebyside LU-356 adding verbose option in test-framework 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 Reviewed-on: http://review.whamcloud.com/862 Reviewed-by: Yu Jian Tested-by: Hudson Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d9c6d13..e200b89 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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