From 53e8d4a7066edc80fc2b9ccff012393a8dfceb4a Mon Sep 17 00:00:00 2001 From: tianzy Date: Mon, 29 Dec 2008 07:19:04 +0000 Subject: [PATCH] Branch b1_8 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 288743e..f43afe8 100644 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1413,7 +1413,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] @@ -1464,7 +1468,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] @@ -1534,6 +1542,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 @@ -1566,7 +1579,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