# block soft limit
test_3() {
local LIMIT=1 # 1MB
- local GRACE=10 # 10s
+ local GRACE=20 # 20s
local TESTFILE=$DIR/$tdir/$tfile-0
set_ost_qtype "ug" || error "enable ost quota failed"
# write should continue & succeed
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
- if [ $count -ge 120 ]; then
+ if [ $count -ge 240 ]; then
quota_error u $TSTUSR "dd not finished in $count secs"
fi
count=$((count + 1))
- [ $((count % 10)) -eq 0 ] && echo "Waiting $count secs"
+ 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
+ fi
sleep 1
done