From d600552c6e053d0b8059904d84f955bc13414d7b Mon Sep 17 00:00:00 2001 From: grev Date: Thu, 3 Dec 2009 09:35:57 +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 d7850aa..9b1bed2 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 14f0768..384c82b 100644 --- a/lustre/tests/recovery-random-scale.sh +++ b/lustre/tests/recovery-random-scale.sh @@ -300,6 +300,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