Whamcloud - gitweb
Branch b1_6
authortianzy <tianzy>
Mon, 10 Mar 2008 09:28:50 +0000 (09:28 +0000)
committertianzy <tianzy>
Mon, 10 Mar 2008 09:28:50 +0000 (09:28 +0000)
improve test_18 and test_18a in sanity-quota.sh
b=14840
i=adilger
i=johann

lustre/ldlm/ldlm_lib.c
lustre/tests/sanity-quota.sh

index f002733..de4c8dc 100644 (file)
@@ -1666,7 +1666,7 @@ int target_handle_dqacq_callback(struct ptlrpc_request *req)
         }
 
         /* Block the quota req. b=14840 */
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_BLOCK_QUOTA_REQ,OBD_TIMEOUT_DEFAULT);
+        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_BLOCK_QUOTA_REQ, obd_timeout);
 
         rc = ptlrpc_reply(req);
 out:
index 7049eaa..d6dff8b 100644 (file)
@@ -1337,16 +1337,17 @@ test_18() {
 
        echo  "   step2: testing ......"
        count=0
+       timeout=$(sysctl -n lustre.timeout)
        while [ true ]; do
            if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
            count=$[count+1]
-           if [ $count -gt 200 ]; then
-               error "dd should be finished!"
+           if [ $count -gt $((2 * $timeout)) ]; then
+               error "count=$count dd should be finished!"
            fi
            sleep 1
        done
-        log -n "(dd_pid=$DDPID, time=$count)"
-        if [ $count -lt 90 ]; then
+        log "(dd_pid=$DDPID, time=$count, timeout=$timeout)"
+        if [ $count -lt $(($timeout - 10)) ]; then
             error " should take longer!"
         else
             echo " successful"
@@ -1388,17 +1389,18 @@ test_18a() {
 
        echo  "   step2: testing ......"
        count=0
+       timeout=$(sysctl -n lustre.timeout)
        while [ true ]; do
            if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
            count=$[count+1]
-           if [ $count -gt 200 ]; then
+           if [ $count -gt $((3 * $timeout)) ]; then
                lustre_fail mds 0
-               error "dd should be finished!"
+               error "count=$count dd should be finished!"
            fi
            sleep 1
        done
-        log -n "(dd_pid=$DDPID, time=$count)"
-        if [ $count -lt 90 ]; then
+        log "(dd_pid=$DDPID, time=$count, timeout=$timeout)"
+        if [ $count -lt $(($timeout - 10)) ]; then
            lustre_fail mds 0
             error " should take longer!"
         else