@@ -52,9 +52,10 @@ $XFS_QUOTA_PROG -x -c "timer -u -i 100 $qa_user" $SCRATCH_MNT
# raw ("since epoch") grace expiry
get=`repquota -up $SCRATCH_MNT | grep "^$qa_user" | awk '{print $NF}'`
-# Either the new expiry must match; or be one second after the set time, to
-# deal with the seconds counter incrementing.
-if [ "$get" != "$set" ] && [ "$get" -ne "$((set + 1))" ]; then
+# Either the new expiry must match or be soon after the set time as there
+# may be load related delays on setting the new timer. A 10s "grace" window
+# should be enough for everyone.
+if [ "$get" != "$set" ] && [ "$get" -gt "$((set + 10))" ]; then
echo "set grace to $set but got grace $get"
fi
@@ -115,6 +115,11 @@ _exercise()
echo
echo "*** push past the soft block limit" | tee -a $seqres.full
_file_as_id $SCRATCH_MNT/softie $id $type $bsize 300
+
+ # sync so that the data is actually allocated as soft limit timers
+ # are not started until block allocation is done. This means the test
+ # will work even if remount sliently fails due to busy mounts
+ _scratch_sync
_qmount
$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
-c "repquota -birnN -$type" $SCRATCH_DEV |