1NFSTEST_DELEGATION(1)       nfstest_delegation 1.8       NFSTEST_DELEGATION(1)
2
3
4

NAME

6       nfstest_delegation - Delegation tests
7

SYNOPSIS

9       nfstest_delegation --server <server> [--client <client>] [options]
10

DESCRIPTION

12       Basic delegation tests verify that a correct delegation is granted when
13       opening a file for reading or writing. Also, another OPEN should not be
14       sent  for the same file when the client is holding a delegation. Verify
15       that the stateid  of  all  I/O  operations  should  be  the  delegation
16       stateid.   Reads  from  a different process on the same file should not
17       cause the client to send additional READ packets  when  the  client  is
18       holding  a  read  delegation.  Furthermore, a LOCK packet should not be
19       sent to the server when the client is holding a delegation.
20
21       Recall delegation tests verify the delegation is recalled when  a  con‐
22       flicting  operation is sent to the server from a different client. Con‐
23       flicting operations are reading, writing, removing, renaming and chang‐
24       ing  the  permissions on the same file. Note that reading a file from a
25       different client can only recall a write delegation. Removing the dele‐
26       gated  file  from  a  different  client  recalls the delegation and the
27       server may or may not allow any more writes from the client  after  the
28       delegation  has  been  returned. Renaming either the delegated file (as
29       source) or into the delegated file (as target) recalls the  delegation.
30       In  the  case where the delegated file is the target of rename, the ex‐
31       isting target is removed before the rename occurs, therefore the server
32       may  or may not allow nay more writes from the client after the delega‐
33       tion has been removed just like in the case when removing the delegated
34       file.
35
36       Also,  verify  that  a read delegation is not recalled when a different
37       client is granted a read delegation. After a  delegation  is  recalled,
38       the  client  may  send an OPEN with CLAIM_DELEGATE_CUR before returning
39       the delegation specially when there is a open pending on the client. In
40       addition,  the  stateid  returned by the new open should be the same as
41       the original OPEN stateid. Also, a delegation  should  not  be  granted
42       when  re-opening  the file before returning the delegation.  The client
43       may flush all written data before returning the WRITE delegation.   The
44       LOCK  should  be  sent  as well before returning a delegation which has
45       been recalled. Finally, a delegation should not be granted on the  sec‐
46       ond client who cause the delegation recall on the first client.
47
48
49

OPTIONS

51       --version
52              show program's version number and exit
53
54       -h, --help
55              show this help message and exit
56
57       -f FILE, --file=FILE
58              File  where  options  are specified besides the system wide file
59              /etc/nfstest, user wide file $HOME/.nfstest or  in  the  current
60              directory .nfstest file
61
62
63   NFS specific options:
64       -s SERVER, --server=SERVER
65              Server name or IP address
66
67       -e EXPORT, --export=EXPORT
68              Exported file system to mount [default: '/']
69
70       --nfsversion=NFSVERSION
71              NFS version, e.g., 3, 4, 4.1, etc. [default: 4.1]
72
73       -m MTPOINT, --mtpoint=MTPOINT
74              Mount point [default: '/mnt/t']
75
76       -p PORT, --port=PORT
77              NFS server port [default: 2049]
78
79       --proto=PROTO
80              NFS protocol name [default: 'tcp']
81
82       --sec=SEC
83              Security flavor [default: 'sys']
84
85       --nconnect=NCONNECT
86              Multiple TCP connections option [default: '1']
87
88       -o MTOPTS, --mtopts=MTOPTS
89              Mount options [default: 'hard,rsize=4096,wsize=4096']
90
91       --datadir=DATADIR
92              Data  directory where files are created, directory is created on
93              the mount point [default: '']
94
95
96   Logging options:
97       -v VERBOSE, --verbose=VERBOSE
98              Verbose     level     for     debug      messages      [default:
99              'opts|info|dbg1|dbg2|dbg3']
100
101       --tverbose=TVERBOSE
102              Verbose level for test messages [default: '1']
103
104       --createlog
105              Create log file
106
107       --rexeclog
108              Create rexec log files
109
110       --warnings
111              Display warnings
112
113       --tag=TAG
114              Informational  tag, it is displayed as an INFO message [default:
115              '']
116
117       --notty
118              Do not use terminal colors on output
119
120       --isatty
121              Use terminal colors on output -- useful when running with nohup
122
123
124   Packet trace options:
125       --createtraces
126              Create a packet trace for each test
127
128       --tbsize=TBSIZE
129              Capture buffer size for tcpdump [default: 192k]
130
131       --trcdelay=TRCDELAY
132              Seconds to delay before stopping packet trace [default: 2.0]
133
134       --keeptraces
135              Do not remove any trace files [default: remove trace files if no
136              errors]
137
138       --rmtraces
139              Remove trace files [default: remove trace files if no errors]
140
141       -i INTERFACE, --interface=INTERFACE
142              Device interface [default: automatically selected]
143
144
145   File options:
146       --nfiles=NFILES
147              Number of files to create [default: 2]
148
149       --filesize=FILESIZE
150              File size to use for test files [default: 64k]
151
152       --rsize=RSIZE
153              Read size to use when reading files [default: 4k]
154
155       --wsize=WSIZE
156              Write size to use when writing files [default: 4k]
157
158       --iodelay=IODELAY
159              Seconds to delay I/O operations [default: 0.1]
160
161       --offset-delta=OFFSET_DELTA
162              Read/Write offset delta [default: 4k]
163
164
165   Path options:
166       --sudo=SUDO
167              Full path of binary for sudo [default: '/usr/bin/sudo']
168
169       --kill=KILL
170              Full path of binary for kill [default: '/usr/bin/kill']
171
172       --nfsstat=NFSSTAT
173              Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
174
175       --tcpdump=TCPDUMP
176              Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
177
178       --iptables=IPTABLES
179              Full path of binary for iptables [default: '/usr/sbin/iptables']
180
181       --messages=MESSAGES
182              Full path of log messages file [default: '/var/log/messages']
183
184       --trcevents=TRCEVENTS
185              Full path of tracing events directory [default: '/sys/kernel/de‐
186              bug/tracing/events']
187
188       --trcpipe=TRCPIPE
189              Full path of trace pipe file [default:  '/sys/kernel/debug/trac‐
190              ing/trace_pipe']
191
192       --tmpdir=TMPDIR
193              Temporary directory [default: '/tmp']
194
195
196   Debug options:
197       --nocleanup
198              Do not cleanup created files
199
200       --notimestamps
201              Do not display timestamps in debug messages
202
203       --bugmsgs=BUGMSGS
204              File containing test messages to mark as bugs if they failed
205
206       --nomount
207              Do not mount server and run the tests on local disk space
208
209       --basename=BASENAME
210              Base  name for all files and logs [default: automatically gener‐
211              ated]
212
213       --nfsdebug=NFSDEBUG
214              Set NFS kernel debug flags and save log messages [default: '']
215
216       --rpcdebug=RPCDEBUG
217              Set RPC kernel debug flags and save log messages [default: '']
218
219       --tracepoints=TRACEPOINTS
220              List of trace points modules to enable [default: '']
221
222       --nfsstats
223              Get NFS stats [default: 'False']
224
225       --pktdisp
226              Display main packets related to the given test
227
228       --nfserrors
229              Fail every NFS error found in the packet trace
230
231       --client-ipaddr=CLIENT_IPADDR
232              IP address of localhost
233
234
235   Reporting options:
236       --xunit-report
237              Generate xUnit compatible test report
238
239       --xunit-report-file=XUNIT_REPORT_FILE
240              Path to xout report file
241
242
243   Test options:
244       --runtest=RUNTEST
245              Comma separated list of tests to run, if list starts with a  '^'
246              then all tests are run except the ones listed [default: 'all']
247
248       --client=CLIENT
249              Remote  NFS client and options used for recall delegation tests.
250              Clients are separated by a ',' and each client definition  is  a
251              list  of arguments separated by a ':' given in the following or‐
252              der if positional arguments  is  used  (see  examples):  client‐
253              name:server:export:nfsversion:port:proto:sec:mtpoint   [default:
254              'nfsversion=3:proto=tcp:port=2049']
255
256       --client-nfsvers=CLIENT_NFSVERS
257              Comma separated list  of  valid  NFS  versions  to  use  in  the
258              --client option. An NFS version from this list, which is differ‐
259              ent than that given by --nfsversion, is selected and included in
260              the --client option [default: 4.0,4.1]
261
262       --lock-offset=LOCK_OFFSET
263              Starting offset for lock [default: 0]
264
265       --lock-poffset=LOCK_POFFSET
266              Starting offset for lock on pending open [default: 8192]
267
268       --lock-len=LOCK_LEN
269              Number of bytes to lock [default: 4096]
270
271       --truncate
272              Truncate  file  when writing from the second file for the recall
273              tests
274
275       --setup-delay=SETUP_DELAY
276              Seconds to delay after setup so all opens are released [default:
277              4.0]
278

TESTS

280   basic
281       Run all basic delegation tests: basic01, basic02, basic03, basic04,
282       basic05, basic06, basic07, basic08, basic09, basic10, basic11, basic12
283
284   stat
285       Run all basic delegation tests with file stat: basic03, basic04,
286       basic09, basic10
287
288   lock
289       Run all basic delegation tests with file lock: basic05, basic06,
290       basic11, basic12
291
292   basic01
293       Basic read delegation test
294
295   basic02
296       Basic write delegation test
297
298   basic03
299       Basic read delegation test with file stat
300
301   basic04
302       Basic write delegation test with file stat
303
304   basic05
305       Basic read delegation test with file lock
306
307   basic06
308       Basic write delegation test with file lock
309
310   basic07
311       Basic write delegation test using RDWR open while reading
312
313   basic08
314       Basic write delegation test using RDWR open while writing
315
316   basic09
317       Basic write delegation test using RDWR open while reading with file stat
318
319   basic10
320       Basic write delegation test using RDWR open while writing with file stat
321
322   basic11
323       Basic write delegation test using RDWR open while reading with file lock
324
325   basic12
326       Basic write delegation test using RDWR open while writing with file lock
327
328   recall
329       Run all recall delegation tests: recall01, recall02, recall03, recall04,
330       recall05, recall06, recall07, recall08, recall09, recall10, recall11,
331       recall12, recall13, recall14, recall15, recall16, recall17, recall18,
332       recall19, recall20, recall21, recall22, recall23, recall24, recall25,
333       recall26, recall27, recall28, recall29, recall30, recall31, recall32,
334       recall33, recall34, recall35, recall36, recall37, recall38, recall39,
335       recall40, recall41, recall42, recall43, recall44, recall45, recall46,
336       recall47, recall48, recall49, recall50, recall51, recall52, recall53,
337       recall54
338
339   setattr
340       Run all tests using SETATTR to recall the delegation: recall07,
341       recall08, recall09, recall10, recall35, recall36, recall37, recall38
342
343   remove
344       Run all tests recalling the delegation by removing the delegated file:
345       recall11, recall12, recall13, recall14, recall39, recall40, recall41,
346       recall42
347
348   rename
349       Run all tests recalling the delegation by renaming the delegated file:
350       recall15, recall16, recall17, recall18, recall19, recall20, recall21,
351       recall22, recall43, recall44, recall45, recall46, recall47, recall48,
352       recall49, recall50
353
354   pending
355       Run all recall delegation tests having a pending open: recall23,
356       recall24, recall25, recall26, recall51, recall52, recall53, recall54
357
358   recall01
359       Recall read delegation by writing from a second client
360
361   recall02
362       Recall write delegation by writing from a second client
363
364   recall03
365       Recall read delegation by writing from a second client with file lock
366
367   recall04
368       Recall write delegation by writing from a second client with file lock
369
370   recall05
371       Recall write delegation by reading from a second client
372
373   recall06
374       Recall write delegation by reading from a second client with file lock
375
376   recall07
377       Recall read delegation by changing the permissions to the file
378
379   recall08
380       Recall write delegation by changing the permissions to the file
381
382   recall09
383       Recall read delegation by changing the permissions to the file with file lock
384
385   recall10
386       Recall write delegation by changing the permissions to the file with file lock
387
388   recall11
389       Recall read delegation by removing the file
390
391   recall12
392       Recall write delegation by removing the file
393
394   recall13
395       Recall read delegation by removing the file with file lock
396
397   recall14
398       Recall write delegation by removing the file with file lock
399
400   recall15
401       Recall read delegation by renaming the file
402
403   recall16
404       Recall write delegation by renaming the file
405
406   recall17
407       Recall read delegation by renaming the file with file lock
408
409   recall18
410       Recall write delegation by renaming the file with file lock
411
412   recall19
413       Recall read delegation by renaming into the file
414
415   recall20
416       Recall write delegation by renaming into the file
417
418   recall21
419       Recall read delegation by renaming into the file with file lock
420
421   recall22
422       Recall write delegation by renaming into the file with file lock
423
424   recall23
425       Recall read delegation by writing from a second client with file lock,
426       having a pending read open
427
428   recall24
429       Recall read delegation by writing from a second client with file lock,
430       having a pending write open.
431       Delegation is returned by the client when the second open is done so
432       there is no delegation recall
433
434   recall25
435       Recall write delegation by writing from a second client with file lock,
436       having a pending read open
437
438   recall26
439       Recall write delegation by writing from a second client with file lock,
440       having a pending write open
441
442   recall27
443       Recall write delegation by reading from a second client using RDWR
444       open while reading
445
446   recall28
447       Recall write delegation by reading from a second client using RDWR
448       open while writing
449
450   recall29
451       Recall write delegation by writing from a second client using RDWR
452       open while reading
453
454   recall30
455       Recall write delegation by writing from a second client using RDWR
456       open while writing
457
458   recall31
459       Recall write delegation by reading from a second client using RDWR
460       open while reading with file lock
461
462   recall32
463       Recall write delegation by reading from a second client using RDWR
464       open while writing with file lock
465
466   recall33
467       Recall write delegation by writing from a second client using RDWR
468       open while reading with file lock
469
470   recall34
471       Recall write delegation by writing from a second client using RDWR
472       open while writing with file lock
473
474   recall35
475       Recall write delegation by changing the permissions to the file
476       from a second client using RDWR open while reading
477
478   recall36
479       Recall write delegation by changing the permissions to the file
480       from a second client using RDWR open while writing
481
482   recall37
483       Recall write delegation by changing the permissions to the file
484       from a second client using RDWR open while reading with file lock
485
486   recall38
487       Recall write delegation by changing the permissions to the file
488       from a second client using RDWR open while writing with file lock
489
490   recall39
491       Recall write delegation by removing the file from a second client
492       using RDWR open while reading
493
494   recall40
495       Recall write delegation by removing the file from a second client
496       using RDWR open while writing
497
498   recall41
499       Recall write delegation by removing the file from a second client
500       using RDWR open while reading with file lock
501
502   recall42
503       Recall write delegation by removing the file from a second client
504       using RDWR open while writing with file lock
505
506   recall43
507       Recall write delegation by renaming the file from a second client
508       using RDWR open while reading
509
510   recall44
511       Recall write delegation by renaming the file from a second client
512       using RDWR open while writing
513
514   recall45
515       Recall write delegation by renaming the file from a second client
516       using RDWR open while reading with file lock
517
518   recall46
519       Recall write delegation by renaming the file from a second client
520       using RDWR open while writing with file lock
521
522   recall47
523       Recall write delegation by renaming the file from a second client
524       using RDWR open while reading
525
526   recall48
527       Recall write delegation by renaming the file from a second client
528       using RDWR open while writing
529
530   recall49
531       Recall write delegation by renaming the file from a second client
532       using RDWR open while reading with file lock
533
534   recall50
535       Recall write delegation by renaming the file from a second client
536       using RDWR open while writing with file lock
537
538   recall51
539       Recall write delegation by writing from a second client using RDWR
540       open while reading with file lock, having a pending read open
541
542   recall52
543       Recall write delegation by writing from a second client using RDWR
544       open while reading with file lock, having a pending write open
545
546   recall53
547       Recall write delegation by writing from a second client using RDWR
548       open while writing with file lock, having a pending read open
549
550   recall54
551       Recall write delegation by writing from a second client using RDWR
552       open while writing with file lock, having a pending write open
553
554   read_deleg
555       Run all read delegation tests: basic01, basic03, basic05, recall01,
556       recall03, recall07, recall09, recall11, recall13, recall15, recall17,
557       recall19, recall21, recall23, recall24
558
559   write_deleg
560       Run all write delegation tests: basic02, basic04, basic06, basic07,
561       basic08, basic09, basic10, basic11, basic12, recall02, recall04,
562       recall05, recall06, recall08, recall10, recall12, recall14, recall16,
563       recall18, recall20, recall22, recall25, recall26, recall27, recall28,
564       recall29, recall30, recall31, recall32, recall33, recall34, recall35,
565       recall36, recall37, recall38, recall39, recall40, recall41, recall42,
566       recall43, recall44, recall45, recall46, recall47, recall48, recall49,
567       recall50, recall51, recall52, recall53, recall54
568
569   all
570       Run all tests: basic01, basic02, basic03, basic04, basic05, basic06,
571       basic07, basic08, basic09, basic10, basic11, basic12, recall01,
572       recall02, recall03, recall04, recall05, recall06, recall07, recall08,
573       recall09, recall10, recall11, recall12, recall13, recall14, recall15,
574       recall16, recall17, recall18, recall19, recall20, recall21, recall22,
575       recall23, recall24, recall25, recall26, recall27, recall28, recall29,
576       recall30, recall31, recall32, recall33, recall34, recall35, recall36,
577       recall37, recall38, recall39, recall40, recall41, recall42, recall43,
578       recall44, recall45, recall46, recall47, recall48, recall49, recall50,
579       recall51, recall52, recall53, recall54
580

EXAMPLES

582       Run the basic delegation tests (no client option):
583           nfstest_delegation --server 192.168.0.2 --export /exports
584
585       Use short options instead:
586           nfstest_delegation -s 192.168.0.2 -e /exports
587
588       Run  both  the  basic  and recall tests using positional arguments with
589       nfsversion=3 for the second client:
590           nfstest_delegation   -s   192.168.0.2    -e    /exports    --client
591       192.168.0.10:::3
592
593       Use named arguments instead:
594           nfstest_delegation    -s    192.168.0.2    -e   /exports   --client
595       192.168.0.10:nfsversion=3
596

NOTES

598       The user id in the local host and the host specified by  --client  must
599       have  access  to  run commands as root using the 'sudo' command without
600       the need for a password.
601
602       The user id must be able to 'ssh' to remote host without the need for a
603       password.
604

SEE ALSO

606       nfstest.test_util(3),     nfstest_alloc(1),    nfstest_cache(1),    nf‐
607       stest_dio(1), nfstest_fcmp(1), nfstest_file(1), nfstest_interop(1), nf‐
608       stest_io(1),   nfstest_lock(1),  nfstest_pkt(1),  nfstest_pnfs(1),  nf‐
609       stest_posix(1), nfstest_rdma(1), nfstest_sparse(1), nfstest_ssc(1), nf‐
610       stest_xattr(1),        nfstest_xid(1),        packet.nfs.nfs3_const(3),
611       packet.nfs.nfs4_const(3)
612
613

BUGS

615       No known bugs.
616

AUTHOR

618       Jorge Mora (mora@netapp.com)
619
620
621
622NFStest 3.2                      21 March 2023           NFSTEST_DELEGATION(1)
Impressum