Whamcloud - gitweb
LU-4422 quota: fix s-q test_6 39/9339/3
authorNiu Yawei <yawei.niu@intel.com>
Fri, 21 Feb 2014 03:07:14 +0000 (22:07 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 10 Mar 2014 23:38:20 +0000 (23:38 +0000)
s-q test_6 should not fail by checking whether the file is
growing, because in most time, the test is waiting for quota
slave reconnecting to quota master.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I2332febf639bdbe033c588b97a2c7a1e1e2f51e2
Reviewed-on: http://review.whamcloud.com/9339
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/sanity-quota.sh

index dd82d99..3648a61 100644 (file)
@@ -860,9 +860,6 @@ run_test 5 "Chown & chgrp successfully even out of block/file quota"
 
 # test dropping acquire request on master
 test_6() {
 
 # test dropping acquire request on master
 test_6() {
-       # LU-4422
-       [ $MDSCOUNT -ge 2 ] && skip "disable test_6 for DNE temporary" && return
-
        local LIMIT=3 # 3M
 
        # Clear dmesg so watchdog is not triggered by previous
        local LIMIT=3 # 3M
 
        # Clear dmesg so watchdog is not triggered by previous
@@ -933,9 +930,8 @@ test_6() {
 
        rm -f $TMP/lustre-log-${TESTNAME}.log
 
 
        rm -f $TMP/lustre-log-${TESTNAME}.log
 
-       # write should continue & succeed
+       # write should continue then fail with EDQUOT
        local count=0
        local count=0
-       local o_size=$(stat -c %s $TESTFILE)
        local c_size
        while [ true ]; do
                if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi
        local c_size
        while [ true ]; do
                if ! ps -p ${DDPID} > /dev/null 2>&1; then break; fi
@@ -945,13 +941,8 @@ test_6() {
                count=$((count + 1))
                if [ $((count % 30)) -eq 0 ]; then
                        c_size=$(stat -c %s $TESTFILE)
                count=$((count + 1))
                if [ $((count % 30)) -eq 0 ]; then
                        c_size=$(stat -c %s $TESTFILE)
-                       if [ $c_size -eq $o_size ]; then
-                               quota_error u $TSTUSR "file not growed" \
-                               "in 30 seconds $o_size/$c_size"
-                       else
-                               echo "Waiting $count secs. $o_size/$c_size"
-                               o_size=$c_size
-                       fi
+                       echo "Waiting $count secs. $c_size"
+                       $SHOW_QUOTA_USER
                fi
                sleep 1
        done
                fi
                sleep 1
        done