NFSTEST_LOCK(1) | nfstest_lock 1.3 | NFSTEST_LOCK(1) |
nfstest_lock - Locking tests
nfstest_lock --server <server> [--client <client>] [options]
Basic locking tests verify that a lock is granted using various arguments to fcntl. These include blocking and non-blocking locks, read or write locks, where the file is opened either for reading, writing or both. It also checks different ranges including limit conditions.
Non-overlapping tests verity that locks are granted on both the client under test and a second process or a remote client when locking the same file.
Overlapping tests verity that a lock is granted on the client under test and a second process or a remote client trying to lock the same file will be denied if a non-blocking lock is issue or will be blocked if a blocking lock is issue on the second process or remote client.
Basic locking tests These tests verify that a lock is granted using various arguments to fcntl. These include blocking and non-blocking locks, read or write locks, where the file is opened either for reading, writing or both. It also checks different ranges including limit conditions.
Run all non-overlapping locking tests: nptest01, nptest02, nptest03, nptest04, nctest01, nctest02, nctest03, nctest04
Run all non-overlapping locking tests using a second process: nptest01, nptest02, nptest03, nptest04
Locking non-overlapping range from a second process where end2 < start1 process1: |------------------| process2: |--------|
Locking non-overlapping range from a second process where end2 == start1 - 1 process1: |------------------| process2: |------------------|
Locking non-overlapping range from a second process where start2 > end1 process1: |------------------| process2: |--------|
Locking non-overlapping range from a second process where start2 == end1 + 1 process1: |------------------| process2: |------------------|
Run all non-overlapping locking tests using a second client: nctest01, nctest02, nctest03, nctest04
Locking non-overlapping range from a second client where end2 < start1 client1: |------------------| client2: |--------|
Locking non-overlapping range from a second client where end2 == start1 - 1 client1: |------------------| client2: |------------------|
Locking non-overlapping range from a second client where start2 > end1 client1: |------------------| client2: |--------|
Locking non-overlapping range from a second client where start2 == end1 + 1 client1: |------------------| client2: |------------------|
Run all overlapping locking tests: optest01, optest02, optest03, optest04, optest05, optest06, optest07, optest08, optest09, octest01, octest02, octest03, octest04, octest05, octest06, octest07, octest08, octest09
Run all overlapping locking tests using a second process: optest01, optest02, optest03, optest04, optest05, optest06, optest07, optest08, optest09
Locking same range from a second process process1: |------------------| process2: |------------------|
Locking overlapping range from a second process where start2 < start1 process1: |------------------| process2: |------------------|
Locking overlapping range from a second process where end2 > end1 process1: |------------------| process2: |------------------|
Locking overlapping range from a second process where range2 is entirely within range1 process1: |------------------| process2: |--------|
Locking overlapping range from a second process where range1 is entirely within range2 process1: |------------------| process2: |----------------------------|
Locking full file range from a second process
Locking overlapping range from a second process where end2 == start1 process1: |------------------| process2: |------------------|
Locking overlapping range from a second process where start2 == end1 process1: |------------------| process2: |------------------|
Locking overlapping range from multiple processes where range2 and range3 are entirely within range1 process1: |-----------------------------| process2: |--------| process3: |--------|
Run all overlapping locking tests using a second client: octest01, octest02, octest03, octest04, octest05, octest06, octest07, octest08, octest09
Locking same range from a second client client1: |------------------| client2: |------------------|
Locking overlapping range from a second client where start2 < start1 client1: |------------------| client2: |------------------|
Locking overlapping range from a second client where end2 > end1 client1: |------------------| client2: |------------------|
Locking overlapping range from a second client where range2 is entirely within range1 client1: |------------------| client2: |--------|
Locking overlapping range from a second client where range1 is entirely within range2 client1: |------------------| client2: |----------------------------|
Locking full file range from a second client
Locking overlapping range from a second client where end2 == start1 client1: |------------------| client2: |------------------|
Locking overlapping range from a second client where start2 == end1 client1: |------------------| client2: |------------------|
Locking overlapping range from multiple clients where range2 and range3 are entirely within range1 client1: |-----------------------------| client2: |--------| client3: |--------|
Run all tests: btest01, nptest01, nptest02, nptest03, nptest04, nctest01, nctest02, nctest03, nctest04, optest01, optest02, optest03, optest04, optest05, optest06, optest07, optest08, optest09, octest01, octest02, octest03, octest04, octest05, octest06, octest07, octest08, octest09
Run the tests which use only the main client (no client option):
nfstest_lock --server 192.168.0.2 --export /exports
Use short options instead:
nfstest_lock -s 192.168.0.2 -e /exports
Use positional arguments with nfsversion=3 for extra client:
nfstest_lock -s 192.168.0.2 -e /exports --client 192.168.0.10:::3
Use named arguments instead:
nfstest_lock -s 192.168.0.2 -e /exports --client
192.168.0.10:nfsversion=3
Use positional arguments with nfsversion=3 for second process:
nfstest_lock -s 192.168.0.2 -e /exports --nfsopts :::3
Use named arguments instead:
nfstest_lock -s 192.168.0.2 -e /exports --nfsopts nfsversion=3
The user id in the local host and the host specified by --client must have access to run commands as root using the 'sudo' command without the need for a password.
The user id must be able to 'ssh' to remote host without the need for a password.
baseobj(3), formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1), nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_rdma(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xattr(1), nfstest_xid(1), packet.nfs.nfs3_const(3), packet.nfs.nfs4_const(3), packet.nfs.nlm4_const(3)
No known bugs.
Jorge Mora (mora@netapp.com)
21 March 2023 | NFStest 3.2 |