From: Dave Chinner Date: Wed, 27 Nov 2024 00:14:03 +0000 (+1100) Subject: fstests: quota grace periods unreliable under load X-Git-Tag: v2024.12.08~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=93c0cac2298c91933f2b770428d579d5b7233b20;p=xfstests-dev.git fstests: quota grace periods unreliable under load Starting the quota grace period doesn't necessary happen predictably when the system is under heavy load. This results in random test failures where grace period timeouts are expected. Signed-off-by: Dave Chinner Reviewed-by: Zorro lang Signed-off-by: Zorro Lang --- diff --git a/tests/generic/601 b/tests/generic/601 index 9860505b..78b6a4aa 100755 --- a/tests/generic/601 +++ b/tests/generic/601 @@ -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 diff --git a/tests/xfs/050 b/tests/xfs/050 index 7baaaeaa..78303bf7 100755 --- a/tests/xfs/050 +++ b/tests/xfs/050 @@ -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 |