selftests: add OFD lock tests
authorStas Sergeev <stsp2@yandex.ru>
Thu, 22 Jun 2023 16:52:24 +0000 (21:52 +0500)
committerJeff Layton <jlayton@kernel.org>
Thu, 24 Aug 2023 14:41:47 +0000 (10:41 -0400)
commitbfe2e8f569073e7297ad19932b980964105bb777
tree1213992728118d6382dfaa41debd9ce735313a43
parent6c9007f65d14c87842920b0d376c9ade34fab152
selftests: add OFD lock tests

Test the basic locking stuff on 2 fds: multiple read locks,
conflicts between read and write locks, use of len==0 for queries.
Also tests for F_UNLCK F_OFD_GETLK extension.

[ jlayton: fix unlink() pathname in selftest ]

Cc: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Cc: linux-api@vger.kernel.org
Signed-off-by: Stas Sergeev <stsp2@yandex.ru>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
tools/testing/selftests/filelock/Makefile [new file with mode: 0644]
tools/testing/selftests/filelock/ofdlocks.c [new file with mode: 0644]