generic/60[01]: fix test failure when setting new grace limit
[xfstests-dev.git] / tests / generic / 600
index 7ea0d6c2cc6e7d793657c9e7693f19cc55787c9a..42e4ee553cec755114bb6fd190db2456bad0e614 100755 (executable)
@@ -60,7 +60,9 @@ let set=now+100
 setquota -T -u $qa_user 0 100 $SCRATCH_MNT 2>&1 | grep -v "^setquota"
 get=`repquota -up $SCRATCH_MNT | grep  "^$qa_user" | awk '{print $NF}'`
 
-if [ "$get" != "$set" ]; then
+# 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
        echo "set grace to $set but got grace $get"
 fi