Whamcloud - gitweb
Branch b1_8
authortianzy <tianzy>
Mon, 29 Dec 2008 07:19:04 +0000 (07:19 +0000)
committertianzy <tianzy>
Mon, 29 Dec 2008 07:19:04 +0000 (07:19 +0000)
fix test problems in test_18 of sanity-quota.sh
b=17985
i=shadow

lustre/tests/sanity-quota.sh

index 288743e..f43afe8 100644 (file)
@@ -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) ==========="