From d425a1a08a7ec348136fbd4f886769edc6785036 Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Mon, 1 Dec 2008 21:34:14 +0000
Subject: [PATCH] b=16897 i=Adilger i=Tappro test_7-b fix: use do_nodes instead
 of loop to run rundbench

---
 lustre/tests/replay-single.sh | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh
index 2a2f26fc07..e97d286f02 100755
--- a/lustre/tests/replay-single.sh
+++ b/lustre/tests/replay-single.sh
@@ -1811,31 +1811,22 @@ test_70b () {
 
 	zconf_mount_clients $CLIENTS $DIR
 	
-	local duration="-t 60"
-	local cmd="rundbench 1 $duration "
+	local duration=120
+	[ "$SLOW" = "no" ] && duration=60
+	local cmd="rundbench 1 -t $duration"
 	local PID=""
-	for CLIENT in ${CLIENTS//,/ }; do
-		$PDSH $CLIENT "set -x; PATH=:$PATH:$LUSTRE/utils:$LUSTRE/tests/:${DBENCH_LIB} DBENCH_LIB=${DBENCH_LIB} $cmd" &
-		PID=$!
-		echo $PID >pid.$CLIENT
-		echo "Started load PID=`cat pid.$CLIENT`"
-	done
+	do_nodes $CLIENTS "set -x; PATH=:$PATH:$LUSTRE/utils:$LUSTRE/tests/:$DBENCH_LIB DBENCH_LIB=$DBENCH_LIB $cmd" &
+	PID=$!
+	log "Started rundbench load PID=$PID ..."
 
+	sleep $((duration / 4))
 	replay_barrier $SINGLEMDS 
 	sleep 3 # give clients a time to do operations
 
 	log "$TESTNAME fail mds 1"
 	fail $SINGLEMDS
 
-# wait for client to reconnect to MDS
-	sleep $TIMEOUT
-
-	for CLIENT in ${CLIENTS//,/ }; do
-		PID=`cat pid.$CLIENT`
-		wait $PID
-		rc=$?
-		echo "load on ${CLIENT} returned $rc"
-	done
+	wait $PID || error "rundbench load on $CLIENTS failed!"
 
 }
 run_test 70b "mds recovery; $CLIENTCOUNT clients"
-- 
GitLab