From c397c9c4d809ab63e977991e356b37661913ee1a Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 3 Jun 2009 11:50:55 +0000 Subject: [PATCH] b=18511 o=Robert.Read i=Brian process tar rc correctly --- lustre/tests/run_tar.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lustre/tests/run_tar.sh b/lustre/tests/run_tar.sh index 9005ac4..1bc47e9 100755 --- a/lustre/tests/run_tar.sh +++ b/lustre/tests/run_tar.sh @@ -23,16 +23,19 @@ echo $$ >$LOAD_PID_FILE TESTDIR=$MOUNT/d0.tar-$(hostname) +do_tar() { + tar cf - /etc | tar xf - 2>&1 | tee $LOG + return ${PIPESTATUS[1]} +} + CONTINUE=true while [ ! -e "$END_RUN_FILE" ] && $CONTINUE; do echoerr "$(date +'%F %H:%M:%S'): tar run starting" mkdir -p $TESTDIR cd $TESTDIR - tar cf - /etc | tar xf - 2>&1 | tee $LOG & - load_pid=$! -ps -e f -o "pid ppid pgrp comm" >$TMP/client-load.ps-list - wait $load_pid - RC=${PIPESTATUS[0]} + do_tar & + wait $! + RC=$? PREV_ERRORS=$(grep "exit delayed from previous errors" $LOG) || true if [ $RC -ne 0 -a "$ERRORS_OK" -a "$PREV_ERRORS" ]; then echoerr "$(date +'%F %H:%M:%S'): tar errors earlier, ignoring" -- 1.8.3.1