From 935ed12a71873fdf9759cfe19da2b12728add564 Mon Sep 17 00:00:00 2001 From: tianzy Date: Mon, 29 Dec 2008 07:19:09 +0000 Subject: [PATCH] Branch b_release_1_8_0 fix test problems in test_18 of sanity-quota.sh b=17985 i=shadow --- lustre/tests/sanity-quota.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index 7834df3..9bd16e7 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1400,7 +1400,11 @@ test_18() { echo " step2: testing ......" count=0 - timeout=$(lctl get_param -n timeout) + if at_is_valid && at_is_enabled; then + timeout=$(at_max_get mds) + else + timeout=$(lctl get_param -n timeout) + fi while [ true ]; do if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi count=$[count+1] @@ -1451,7 +1455,11 @@ test_18a() { echo " step2: testing ......" count=0 - timeout=$(lctl get_param -n timeout) + if at_is_valid && at_is_enabled; then + timeout=$(at_max_get mds) + else + timeout=$(lctl get_param -n timeout) + fi while [ true ]; do if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi count=$[count+1] @@ -1521,6 +1529,11 @@ test_18bc_sub() { fi count=0 + if at_is_valid && at_is_enabled; then + timeout=$(at_max_get mds) + else + timeout=$(lctl get_param -n timeout) + fi while [ true ]; do if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi if [ $((++count % (2 * timeout) )) -eq 0 ]; then @@ -1553,7 +1566,7 @@ test_18b() { print; } }' $TMP/lustre-log-${TESTNAME}.log` - if [ -n "$watchdog" ]; then error "$watchdog"; fi + [ `echo "$watchdog" | wc -l` -ge 3 ] && error "$watchdog" rm -f $TMP/lustre-log-${TESTNAME}.log } run_test_with_stat 18b "run for fixing bug14840(mds failover, no watchdog) ===========" -- 1.8.3.1