mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic/571: skip test on filesystems that don't support F_SETLEASE fcntl
Add an option to the locktest program to check for fcntl setlease support, and skip the generic/571 test on filesystems where the check returns EINVAL. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
@@ -3501,6 +3501,14 @@ _require_test_fcntl_advisory_locks()
|
||||
_notrun "Require fcntl advisory locks support"
|
||||
}
|
||||
|
||||
_require_test_fcntl_setlease()
|
||||
{
|
||||
_require_test_program "locktest"
|
||||
touch $TEST_DIR/setlease_testfile
|
||||
$here/src/locktest -t $TEST_DIR/setlease_testfile >/dev/null 2>&1
|
||||
[ $? -eq 22 ] && _notrun "Require fcntl setlease support"
|
||||
}
|
||||
|
||||
_require_ofd_locks()
|
||||
{
|
||||
# Give a test run by getlk wrlck on testfile.
|
||||
|
||||
Reference in New Issue
Block a user