From d1d636882bd8ae49d173243482957717473bd9b0 Mon Sep 17 00:00:00 2001 From: grev Date: Thu, 3 Dec 2009 09:38:13 +0000 Subject: [PATCH] b=21265 i=Robert.Read skip last sleep if ELAPSED + sleep > DURATION --- lustre/tests/recovery-mds-scale.sh | 5 +++++ lustre/tests/recovery-random-scale.sh | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lustre/tests/recovery-mds-scale.sh b/lustre/tests/recovery-mds-scale.sh index 44801bc..9d9da93 100644 --- a/lustre/tests/recovery-mds-scale.sh +++ b/lustre/tests/recovery-mds-scale.sh @@ -266,6 +266,11 @@ Failed to meet interval $reqfail times ( REQFAIL=$REQFAIL ); have sleep=$sleep" fi log "$SERVERFACET has failed over ${!var} times, and counting..." + + if [ $((ELAPSED + sleep)) -gt $DURATION ]; then + break + fi + if [ $sleep -gt 0 ]; then echo "sleeping $sleep seconds ... " sleep $sleep diff --git a/lustre/tests/recovery-random-scale.sh b/lustre/tests/recovery-random-scale.sh index dfde69a..878e594 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -294,6 +294,10 @@ Failed to meet interval $reqfail times ( REQFAIL=$REQFAIL ); have sleep=$sleep" log " Number of failovers: $(numfailovers) and counting..." + if [ $((ELAPSED + sleep)) -gt $DURATION ]; then + break + fi + if [ $sleep -gt 0 ]; then echo "sleeping $sleep seconds ... " sleep $sleep -- 1.8.3.1