1NFSTEST_XATTR(1) nfstest_xattr 1.1 NFSTEST_XATTR(1)
2
3
4
6 nfstest_xattr - Extended Attributes tests
7
9 nfstest_xattr --server <server> [options]
10
12 Verify correct functionality of extended attributes
13
14 Extended attributes are name:value pairs associated permanently with
15 files and directories, similar to the environment strings associated
16 with a process. An attribute may be defined or undefined. If it is de‐
17 fined, its value may be empty or non-empty. Extended attributes are ex‐
18 tensions to the normal attributes which are associated with all inodes
19 in the system. They are often used to provide additional functionality
20 to a filesystem.
21
22 Tests are divided into five groups: getxattr, setxattr, removexattr,
23 listxattr and cinfo. The getxattr tests verify the retrieval of ex‐
24 tended attribute values. The setxattr tests verify the creation or mod‐
25 ification of extended attributes. The removexattr tests verify the re‐
26 moval of extended attributes. The listxattr tests verify the listing of
27 extended attributes. And finally, the cinfo tests verify the change
28 info returned by the server is correct when the file is either modified
29 or not from a different client.
30
31 Furthermore, when a different client is holding a read delegation, ver‐
32 ify the delegation is recalled only when creating, modifying or remov‐
33 ing an extended attribute. On the other hand, verify the read delega‐
34 tion is not recalled when listing attributes or retrieving their val‐
35 ues.
36
37 Negative testing is included like retrieval or removal of an extended
38 attribute name which does not exist. Creating an attribute which al‐
39 ready exists should fail while using XATTR_CREATE flag. Trying to mod‐
40 ify an attribute which does not exist should fail if using XATTR_RE‐
41 PLACE flag.
42
43
44
46 --version
47 show program's version number and exit
48
49 -h, --help
50 show this help message and exit
51
52 -f FILE, --file=FILE
53 File where options are specified besides the system wide file
54 /etc/nfstest, user wide file $HOME/.nfstest or in the current
55 directory .nfstest file
56
57
58 NFS specific options:
59 -s SERVER, --server=SERVER
60 Server name or IP address
61
62 -e EXPORT, --export=EXPORT
63 Exported file system to mount [default: '/']
64
65 --nfsversion=NFSVERSION
66 NFS version, e.g., 3, 4, 4.1, etc. [default: 4.2]
67
68 -m MTPOINT, --mtpoint=MTPOINT
69 Mount point [default: '/mnt/t']
70
71 -p PORT, --port=PORT
72 NFS server port [default: 2049]
73
74 --proto=PROTO
75 NFS protocol name [default: 'tcp']
76
77 --sec=SEC
78 Security flavor [default: 'sys']
79
80 --nconnect=NCONNECT
81 Multiple TCP connections option [default: '1']
82
83 -o MTOPTS, --mtopts=MTOPTS
84 Mount options [default: 'hard,rsize=4096,wsize=4096']
85
86 --datadir=DATADIR
87 Data directory where files are created, directory is created on
88 the mount point [default: '']
89
90
91 Logging options:
92 -v VERBOSE, --verbose=VERBOSE
93 Verbose level for debug messages [default:
94 'opts|info|dbg1|dbg2|dbg3']
95
96 --tverbose=TVERBOSE
97 Verbose level for test messages [default: '1']
98
99 --createlog
100 Create log file
101
102 --rexeclog
103 Create rexec log files
104
105 --warnings
106 Display warnings
107
108 --tag=TAG
109 Informational tag, it is displayed as an INFO message [default:
110 '']
111
112 --notty
113 Do not use terminal colors on output
114
115 --isatty
116 Use terminal colors on output -- useful when running with nohup
117
118
119 Packet trace options:
120 --createtraces
121 Create a packet trace for each test
122
123 --tbsize=TBSIZE
124 Capture buffer size for tcpdump [default: 192k]
125
126 --trcdelay=TRCDELAY
127 Seconds to delay before stopping packet trace [default: 2.0]
128
129 --keeptraces
130 Do not remove any trace files [default: remove trace files if no
131 errors]
132
133 --rmtraces
134 Remove trace files [default: remove trace files if no errors]
135
136 -i INTERFACE, --interface=INTERFACE
137 Device interface [default: automatically selected]
138
139
140 File options:
141 --nfiles=NFILES
142 Number of files to create [default: 2]
143
144 --filesize=FILESIZE
145 File size to use for test files [default: 64k]
146
147 --rsize=RSIZE
148 Read size to use when reading files [default: 4k]
149
150 --wsize=WSIZE
151 Write size to use when writing files [default: 4k]
152
153 --iodelay=IODELAY
154 Seconds to delay I/O operations [default: 0.1]
155
156 --offset-delta=OFFSET_DELTA
157 Read/Write offset delta [default: 4k]
158
159
160 Path options:
161 --sudo=SUDO
162 Full path of binary for sudo [default: '/usr/bin/sudo']
163
164 --kill=KILL
165 Full path of binary for kill [default: '/usr/bin/kill']
166
167 --nfsstat=NFSSTAT
168 Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
169
170 --tcpdump=TCPDUMP
171 Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
172
173 --iptables=IPTABLES
174 Full path of binary for iptables [default: '/usr/sbin/iptables']
175
176 --messages=MESSAGES
177 Full path of log messages file [default: '/var/log/messages']
178
179 --trcevents=TRCEVENTS
180 Full path of tracing events directory [default: '/sys/kernel/de‐
181 bug/tracing/events']
182
183 --trcpipe=TRCPIPE
184 Full path of trace pipe file [default: '/sys/kernel/debug/trac‐
185 ing/trace_pipe']
186
187 --tmpdir=TMPDIR
188 Temporary directory [default: '/tmp']
189
190
191 Debug options:
192 --nocleanup
193 Do not cleanup created files
194
195 --notimestamps
196 Do not display timestamps in debug messages
197
198 --bugmsgs=BUGMSGS
199 File containing test messages to mark as bugs if they failed
200
201 --nomount
202 Do not mount server and run the tests on local disk space
203
204 --basename=BASENAME
205 Base name for all files and logs [default: automatically gener‐
206 ated]
207
208 --nfsdebug=NFSDEBUG
209 Set NFS kernel debug flags and save log messages [default: '']
210
211 --rpcdebug=RPCDEBUG
212 Set RPC kernel debug flags and save log messages [default: '']
213
214 --tracepoints=TRACEPOINTS
215 List of trace points modules to enable [default: '']
216
217 --nfsstats
218 Get NFS stats [default: 'False']
219
220 --pktdisp
221 Display main packets related to the given test
222
223 --nfserrors
224 Fail every NFS error found in the packet trace
225
226 --client-ipaddr=CLIENT_IPADDR
227 IP address of localhost
228
229
230 Reporting options:
231 --xunit-report
232 Generate xUnit compatible test report
233
234 --xunit-report-file=XUNIT_REPORT_FILE
235 Path to xout report file
236
237
238 Test options:
239 --runtest=RUNTEST
240 Comma separated list of tests to run, if list starts with a '^'
241 then all tests are run except the ones listed [default: 'all']
242
243 --num-xattrs=NUM_XATTRS
244 Number of extended attributes to create for listxattr tests with
245 many attributes [default: 20]
246
247 --client=CLIENT
248 Remote NFS client and options used for delegation tests. Clients
249 are separated by a ',' and each client definition is a list of
250 arguments separated by a ':' given in the following order if po‐
251 sitional arguments is used (see examples): clientname:server:ex‐
252 port:nfsversion:port:proto:sec:mtpoint [default: 'nfsver‐
253 sion=3:proto=tcp:port=2049']
254
255 --client-nfsvers=CLIENT_NFSVERS
256 Comma separated list of valid NFS versions to use in the
257 --client option. An NFS version from this list, which is differ‐
258 ent than that given by --nfsversion, is selected and included in
259 the --client option [default: 4.0,4.1]
260
262 ngetxattr01
263 Verify getting extended attribute
264
265 ngetxattr02
266 Verify getting extended attribute fails when attribute does not exist
267
268 dgetxattr01
269 Verify getting extended attribute
270 when delegation is granted on second client
271
272 dgetxattr02
273 Verify getting extended attribute fails when attribute does not exist
274 when delegation is granted on second client
275
276 nsetxattr01
277 Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist
278
279 nsetxattr02
280 Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist
281
282 nsetxattr03
283 Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist
284
285 nsetxattr04
286 Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists
287
288 nsetxattr05
289 Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists
290
291 nsetxattr06
292 Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists
293
294 dsetxattr01
295 Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist
296 when delegation is granted on second client
297
298 dsetxattr02
299 Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist
300 when delegation is granted on second client
301
302 dsetxattr03
303 Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist
304 when delegation is granted on second client
305
306 dsetxattr04
307 Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists
308 when delegation is granted on second client
309
310 dsetxattr05
311 Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists
312 when delegation is granted on second client
313
314 dsetxattr06
315 Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists
316 when delegation is granted on second client
317
318 nremovexattr01
319 Verify removing extended attribute
320
321 nremovexattr02
322 Verify removing extended attribute fails when attribute does not exist
323
324 dremovexattr01
325 Verify removing extended attribute
326 when delegation is granted on second client
327
328 dremovexattr02
329 Verify removing extended attribute fails when attribute does not exist
330 when delegation is granted on second client
331
332 nlistxattr01
333 Verify listing extended attributes with no user namespace attributes
334
335 nlistxattr02
336 Verify listing extended attribute
337
338 nlistxattr03
339 Verify listing extended attribute (many attributes)
340
341 dlistxattr01
342 Verify listing extended attributes with no user namespace attributes
343 when delegation is granted on second client
344
345 dlistxattr02
346 Verify listing extended attribute
347 when delegation is granted on second client
348
349 dlistxattr03
350 Verify listing extended attribute (many attributes)
351 when delegation is granted on second client
352
353 ncinfo01
354 Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist
355
356 ncinfo02
357 Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists
358
359 ncinfo03
360 Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist
361
362 ncinfo04
363 Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists
364
365 mcinfo01
366 Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist
367 when file is modified on second client
368
369 mcinfo02
370 Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists
371 when file is modified on second client
372
373 mcinfo03
374 Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist
375 when file is modified on second client
376
377 mcinfo04
378 Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists
379 when file is modified on second client
380
381 getxattr
382 Run all GETXATTR tests: ngetxattr01, ngetxattr02, dgetxattr01,
383 dgetxattr02
384
385 ngetxattr
386 Run all GETXATTR tests when no open on second client: ngetxattr01,
387 ngetxattr02
388
389 dgetxattr
390 Run all GETXATTR tests when delegation is granted on second client:
391 dgetxattr01, dgetxattr02
392
393 setxattr
394 Run all SETXATTR tests: nsetxattr01, nsetxattr02, nsetxattr03,
395 nsetxattr04, nsetxattr05, nsetxattr06, dsetxattr01, dsetxattr02,
396 dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06
397
398 nsetxattr
399 Run all SETXATTR tests when no open on second client: nsetxattr01,
400 nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06
401
402 dsetxattr
403 Run all SETXATTR tests when delegation is granted on second client:
404 dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05,
405 dsetxattr06
406
407 removexattr
408 Run all REMOVEXATTR tests: nremovexattr01, nremovexattr02,
409 dremovexattr01, dremovexattr02
410
411 nremovexattr
412 Run all REMOVEXATTR tests when no open on second client: nremovexattr01,
413 nremovexattr02
414
415 dremovexattr
416 Run all REMOVEXATTR tests when delegation is granted on second client:
417 dremovexattr01, dremovexattr02
418
419 listxattr
420 Run all LISTXATTRS tests: nlistxattr01, nlistxattr02, nlistxattr03,
421 dlistxattr01, dlistxattr02, dlistxattr03
422
423 nlistxattr
424 Run all LISTXATTRS tests when no open on second client: nlistxattr01,
425 nlistxattr02, nlistxattr03
426
427 dlistxattr
428 Run all LISTXATTRS tests when delegation is granted on second client:
429 dlistxattr01, dlistxattr02, dlistxattr03
430
431 cinfo
432 Run all CINFO tests: ncinfo01, ncinfo02, ncinfo03, ncinfo04, mcinfo01,
433 mcinfo02, mcinfo03, mcinfo04
434
435 ncinfo
436 Run all CINFO tests when no open on second client: ncinfo01, ncinfo02,
437 ncinfo03, ncinfo04
438
439 mcinfo
440 Run all CINFO tests when file is modified on second client: mcinfo01,
441 mcinfo02, mcinfo03, mcinfo04
442
443 all
444 Run all tests: ngetxattr01, ngetxattr02, dgetxattr01, dgetxattr02,
445 nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05,
446 nsetxattr06, dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04,
447 dsetxattr05, dsetxattr06, nremovexattr01, nremovexattr02,
448 dremovexattr01, dremovexattr02, nlistxattr01, nlistxattr02,
449 nlistxattr03, dlistxattr01, dlistxattr02, dlistxattr03, ncinfo01,
450 ncinfo02, ncinfo03, ncinfo04, mcinfo01, mcinfo02, mcinfo03, mcinfo04
451
453 The only required option is --server
454 $ nfstest_xattr --server 192.168.0.11
455
457 The user id in the local host and the host specified by --client must
458 have access to run commands as root using the 'sudo' command without
459 the need for a password.
460
461 The user id must be able to 'ssh' to remote host without the need for a
462 password.
463
464 Valid only for NFS version 4.2 and above.
465
467 baseobj(3), formatstr(3), nfstest.test_util(3), nfstest_alloc(1), nf‐
468 stest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1),
469 nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1),
470 nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_rdma(1), nf‐
471 stest_sparse(1), nfstest_ssc(1), nfstest_xid(1),
472 packet.nfs.nfs4_const(3)
473
474
476 No known bugs.
477
479 Jorge Mora (mora@netapp.com)
480
481
482
483NFStest 3.2 21 March 2023 NFSTEST_XATTR(1)