generic/60[01]: fix test failure when setting new grace limit
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 15 Sep 2020 01:43:08 +0000 (18:43 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 20 Sep 2020 16:35:01 +0000 (00:35 +0800)
commit4f9dd7359651b5d3507bd3734b2c09649a3cb0f6
treeb80e96a9c4e4bfe040bb1a80753bf6b7999d0f7c
parentd40de4f744415dd87178d97a654b6a4ead6ab4d4
generic/60[01]: fix test failure when setting new grace limit

The setquota command can extend a quota grace period by a certain number
of seconds.  The extension is provided as a number of seconds relative
to right now.  However, if the system clock increments the seconds count
after this test assigns $now but before setquota gets called, the test
will fail because $get and $set will be off by that 1 second.  Allow for
that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/generic/600
tests/generic/601