From 564ea7d610772548031ffa4fb6bccb92c6302023 Mon Sep 17 00:00:00 2001 From: tianzy Date: Mon, 29 Dec 2008 07:19:42 +0000 Subject: [PATCH] Branch HEAD 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 e011bc7..1410a03 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1344,7 +1344,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] @@ -1395,7 +1399,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] @@ -1465,6 +1473,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 @@ -1497,7 +1510,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