1NFSTEST_LOCK(1) nfstest_lock 1.2 NFSTEST_LOCK(1)
2
3
4
6 nfstest_lock - Locking tests
7
9 nfstest_lock --server <server> [--client <client>] [options]
10
12 Basic locking tests verify that a lock is granted using various argu‐
13 ments to fcntl. These include blocking and non-blocking locks, read or
14 write locks, where the file is opened either for reading, writing or
15 both. It also checks different ranges including limit conditions.
16
17 Non-overlapping tests verity that locks are granted on both the client
18 under test and a second process or a remote client when locking the
19 same file.
20
21 Overlapping tests verity that a lock is granted on the client under
22 test and a second process or a remote client trying to lock the same
23 file will be denied if a non-blocking lock is issue or will be blocked
24 if a blocking lock is issue on the second process or remote client.
25
26
27
29 --version
30 show program's version number and exit
31
32 -h, --help
33 show this help message and exit
34
35 -f FILE, --file=FILE
36 File where options are specified besides the system wide file
37 /etc/nfstest, user wide file $HOME/.nfstest or in the current
38 directory .nfstest file
39
40
41 NFS specific options:
42 -s SERVER, --server=SERVER
43 Server name or IP address
44
45 -e EXPORT, --export=EXPORT
46 Exported file system to mount [default: '/']
47
48 --nfsversion=NFSVERSION
49 NFS version, e.g., 3, 4, 4.1, etc. [default: 4.1]
50
51 -m MTPOINT, --mtpoint=MTPOINT
52 Mount point [default: '/mnt/t']
53
54 -p PORT, --port=PORT
55 NFS server port [default: 2049]
56
57 --proto=PROTO
58 NFS protocol name [default: 'tcp']
59
60 --sec=SEC
61 Security flavor [default: 'sys']
62
63 -o MTOPTS, --mtopts=MTOPTS
64 Mount options [default: 'hard,rsize=4096,wsize=4096']
65
66 --datadir=DATADIR
67 Data directory where files are created, directory is created on
68 the mount point [default: '']
69
70
71 Logging options:
72 -v VERBOSE, --verbose=VERBOSE
73 Verbose level for debug messages [default: 'none']
74
75 --tverbose=TVERBOSE
76 Verbose level for test messages [default: '1']
77
78 --createlog
79 Create log file
80
81 --rexeclog
82 Create rexec log files
83
84 --warnings
85 Display warnings
86
87 --tag=TAG
88 Informational tag, it is displayed as an INFO message [default:
89 '']
90
91 --notty
92 Do not use terminal colors on output
93
94
95 Packet trace options:
96 --createtraces
97 Create a packet trace for each test
98
99 --tbsize=TBSIZE
100 Capture buffer size for tcpdump [default: 192k]
101
102 --trcdelay=TRCDELAY
103 Seconds to delay before stopping packet trace [default: 0.0]
104
105 --keeptraces
106 Do not remove any trace files [default: remove trace files if no
107 errors]
108
109 --rmtraces
110 Remove trace files [default: remove trace files if no errors]
111
112 -i INTERFACE, --interface=INTERFACE
113 Device interface [default: automatically selected]
114
115 --subtraces
116 Create a packet trace for each sub-test. Use it with caution
117 since it will create a lot of packet traces. Use --createtraces
118 instead unless trying to get a packet trace for a specific sub-
119 test. Best if it is used in combination with the --runtest
120 option.
121
122
123 File options:
124 --nfiles=NFILES
125 Number of files to create [default: 2]
126
127 --filesize=FILESIZE
128 File size to use for test files [default: 64k]
129
130 --rsize=RSIZE
131 Read size to use when reading files [default: 4k]
132
133 --wsize=WSIZE
134 Write size to use when writing files [default: 4k]
135
136 --iodelay=IODELAY
137 Seconds to delay I/O operations [default: 0.1]
138
139 --offset-delta=OFFSET_DELTA
140 Read/Write offset delta [default: 4k]
141
142
143 Path options:
144 --sudo=SUDO
145 Full path of binary for sudo [default: '/usr/bin/sudo']
146
147 --tcpdump=TCPDUMP
148 Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
149
150 --iptables=IPTABLES
151 Full path of binary for iptables [default: '/usr/sbin/iptables']
152
153 --messages=MESSAGES
154 Full path of log messages file [default: '/var/log/messages']
155
156 --tmpdir=TMPDIR
157 Temporary directory [default: '/tmp']
158
159
160 Debug options:
161 --nocleanup
162 Do not cleanup created files
163
164 --bugmsgs=BUGMSGS
165 File containing test messages to mark as bugs if they failed
166
167 --ignore
168 Ignore all bugs given by bugmsgs
169
170 --nomount
171 Do not mount server and run the tests on local disk space
172
173 --basename=BASENAME
174 Base name for all files and logs [default: automatically gener‐
175 ated]
176
177 --nfsdebug=NFSDEBUG
178 Set NFS kernel debug flags and save log messages [default: '']
179
180 --rpcdebug=RPCDEBUG
181 Set RPC kernel debug flags and save log messages [default: '']
182
183 --pktdisp
184 Display main packets related to the given test
185
186
187 Test options:
188 --runtest=RUNTEST
189 Comma separated list of tests to run, if list starts with a '^'
190 then all tests are run except the ones listed [default: 'all']
191
192 --client=CLIENT
193 Remote NFS client used for conflicting lock tests
194
195 --offset=OFFSET
196 Offset of first lock granted [default: 4k]
197
198 --length=LENGTH
199 Length of first lock granted [default: 4k]
200
201 --unlock-delay=UNLOCK_DELAY
202 Time in seconds to unlock first lock [default: 2.0]
203
204 --lockw-timeout=LOCKW_TIMEOUT
205 Time in seconds to wait for blocked lock after conflicting lock
206 has been released [default: 30]
207
208 --opentype=OPENTYPE
209 List of open types to test [default: read,write,rdwr]
210
211 --locktype=LOCKTYPE
212 List of lock types to test [default: read,write]
213
214 --opentype2=OPENTYPE2
215 List of open types to test on remote client [default:
216 read,write,rdwr]
217
218 --locktype2=LOCKTYPE2
219 List of lock types to test on remote client [default:
220 read,write]
221
222 --setlock=SETLOCK
223 List of set lock types to test [default: immediate,block]
224
226 btest01
227 Basic locking tests
228 These tests verify that a lock is granted using various arguments
229 to fcntl. These include blocking and non-blocking locks, read or
230 write locks, where the file is opened either for reading, writing
231 or both. It also checks different ranges including limit conditions.
232
233 noverlap
234 Run all non-overlapping locking tests: nptest01, nptest02, nptest03,
235 nptest04, nctest01, nctest02, nctest03, nctest04
236
237 nptest
238 Run all non-overlapping locking tests using a second process: nptest01,
239 nptest02, nptest03, nptest04
240
241 nptest01
242 Locking non-overlapping range from a second process where end2 < start1
243 process1: |------------------|
244 process2: |--------|
245
246 nptest02
247 Locking non-overlapping range from a second process where end2 == start1 - 1
248 process1: |------------------|
249 process2: |------------------|
250
251 nptest03
252 Locking non-overlapping range from a second process where start2 > end1
253 process1: |------------------|
254 process2: |--------|
255
256 nptest04
257 Locking non-overlapping range from a second process where start2 == end1 + 1
258 process1: |------------------|
259 process2: |------------------|
260
261 nctest
262 Run all non-overlapping locking tests using a second client: nctest01,
263 nctest02, nctest03, nctest04
264
265 nctest01
266 Locking non-overlapping range from a second client where end2 < start1
267 client1: |------------------|
268 client2: |--------|
269
270 nctest02
271 Locking non-overlapping range from a second client where end2 == start1 - 1
272 client1: |------------------|
273 client2: |------------------|
274
275 nctest03
276 Locking non-overlapping range from a second client where start2 > end1
277 client1: |------------------|
278 client2: |--------|
279
280 nctest04
281 Locking non-overlapping range from a second client where start2 == end1 + 1
282 client1: |------------------|
283 client2: |------------------|
284
285 overlap
286 Run all overlapping locking tests: optest01, optest02, optest03,
287 optest04, optest05, optest06, optest07, optest08, octest01, octest02,
288 octest03, octest04, octest05, octest06, octest07, octest08
289
290 optest
291 Run all overlapping locking tests using a second process: optest01,
292 optest02, optest03, optest04, optest05, optest06, optest07, optest08
293
294 optest01
295 Locking same range from a second process
296 process1: |------------------|
297 process2: |------------------|
298
299 optest02
300 Locking overlapping range from a second process where start2 < start1
301 process1: |------------------|
302 process2: |------------------|
303
304 optest03
305 Locking overlapping range from a second process where end2 > end1
306 process1: |------------------|
307 process2: |------------------|
308
309 optest04
310 Locking overlapping range from a second process where range2 is entirely within range1
311 process1: |------------------|
312 process2: |--------|
313
314 optest05
315 Locking overlapping range from a second process where range1 is entirely within range2
316 process1: |------------------|
317 process2: |----------------------------|
318
319 optest06
320 Locking full file range from a second process
321
322 optest07
323 Locking overlapping range from a second process where end2 == start1
324 process1: |------------------|
325 process2: |------------------|
326
327 optest08
328 Locking overlapping range from a second process where start2 == end1
329 process1: |------------------|
330 process2: |------------------|
331
332 octest
333 Run all overlapping locking tests using a second client: octest01,
334 octest02, octest03, octest04, octest05, octest06, octest07, octest08
335
336 octest01
337 Locking same range from a second client
338 client1: |------------------|
339 client2: |------------------|
340
341 octest02
342 Locking overlapping range from a second client where start2 < start1
343 client1: |------------------|
344 client2: |------------------|
345
346 octest03
347 Locking overlapping range from a second client where end2 > end1
348 client1: |------------------|
349 client2: |------------------|
350
351 octest04
352 Locking overlapping range from a second client where range2 is entirely within range1
353 client1: |------------------|
354 client2: |--------|
355
356 octest05
357 Locking overlapping range from a second client where range1 is entirely within range2
358 client1: |------------------|
359 client2: |----------------------------|
360
361 octest06
362 Locking full file range from a second client
363
364 octest07
365 Locking overlapping range from a second client where end2 == start1
366 client1: |------------------|
367 client2: |------------------|
368
369 octest08
370 Locking overlapping range from a second client where start2 == end1
371 client1: |------------------|
372 client2: |------------------|
373
375 The user id in the local host and the host specified by --client must
376 have access to run commands as root using the 'sudo' command without
377 the need for a password.
378
379 The user id must be able to 'ssh' to remote host without the need for a
380 password.
381
383 formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1),
384 nfstest_delegation(1), nfstest_dio(1), nfstest_file(1),
385 nfstest_interop(1), nfstest_io(1), nfstest_pkt(1), nfstest_pnfs(1),
386 nfstest_posix(1), nfstest_sparse(1), nfstest_ssc(1), nfstest_xid(1)
387
388
390 No known bugs.
391
393 Jorge Mora (mora@netapp.com)
394
395
396
397NFStest 2.1.5 14 February 2017 NFSTEST_LOCK(1)