From e827bab41cad660c343eafc4a11665de2b18ec6f Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 12 Mar 2008 18:07:15 +0000 Subject: [PATCH] b=13283 i=Adilger rsh do_node fix --- lustre/tests/test-framework.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index c3b23f3..cd7b3c2 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -672,6 +672,17 @@ do_node() { echo "CMD: $HOST $@" >&2 $myPDSH $HOST $LCTL mark "$@" > /dev/null 2>&1 || : fi + + if [ "$myPDSH" = "rsh" ]; then +# we need this because rsh does not return exit code of an executed command + local command_status="$TMP/cs" + rsh $HOST ":> $command_status" + rsh $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; + cd $RPWD; sh -c \"$@\") || + echo command failed >$command_status" + [ -n "$($myPDSH $HOST cat $command_status)" ] && return 1 || true + return 0 + fi $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed "s/^${HOST}: //" return ${PIPESTATUS[0]} } -- 1.8.3.1