From 289ce3d59b618f4484465fc2833c5ead918fde98 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 12 Mar 2008 18:01:23 +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 66ef7a8..91856a4 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -811,6 +811,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