diff options
author | Xiong Zhou <xzhou@redhat.com> | 2018-02-13 22:10:26 +0800 |
---|---|---|
committer | Eryu Guan <eguan@redhat.com> | 2018-02-16 01:28:32 +0800 |
commit | 4a6d40ad68655bceff5bbd9f460d4672abb6cb0a (patch) | |
tree | 86013b0614281d6bc9c0967fc9439b16b80663a5 /src/Makefile | |
parent | 03cc97346b1d2ace4c85583764c7f94024155cb1 (diff) |
generic: add OFD lock tests
Test OFD locks. Use fcntl F_OFD_SETLK/F_OFD_GETLK, to verify we are
being given correct advices through getlk by kernel.
The basic idea is one setlk routine setting locks via fcntl *_SETLK,
followed by operations like clone, dup then close fd; another
routine getlk getting locks via fcntl *_GETLK.
Firstly in setlk routine process P0, place a lock L0 on an opened
testfile, then do clone or dup and close relative fd.
In getlk process P2, do fcntl *_GETLK with lock L1 after get
notified by setlk routine.
In the end, getlk routine check the returned struct flock.l_type to
see if the lock mechanism works fine.
Test combainations of:
- shared or exclusive lock
- these locks are conflicting or not
- one OFD lock and one POSIX lock
- that open testfile RDONLY or RDWR
- clone with CLONE_FILES or not
- dup and close newfd
[eguan: made some minor non-functional changes]
Signed-off-by: Xiong Zhou <xzhou@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index b96b8cf2..0d3feae1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -14,7 +14,8 @@ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \ t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \ holetest t_truncate_self t_mmap_dio af_unix t_mmap_stale_pmd \ t_mmap_cow_race t_mmap_fallocate fsync-err t_mmap_write_ro \ - t_ext4_dax_journal_corruption t_ext4_dax_inline_corruption + t_ext4_dax_journal_corruption t_ext4_dax_inline_corruption \ + t_ofd_locks LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \ preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \ |