1NFSTEST_POSIX(1)               nfstest_posix 1.2              NFSTEST_POSIX(1)
2
3
4

NAME

6       nfstest_posix - POSIX file system level access tests
7

SYNOPSIS

9       nfstest_posix --server <server> [options]
10

DESCRIPTION

12       Verify  POSIX  file  system  level access over the specified path using
13       positive and negative testing.
14
15       Valid for any version of NFS.
16
17
18

OPTIONS

20       --version
21              show program's version number and exit
22
23       -h, --help
24              show this help message and exit
25
26       -f FILE, --file=FILE
27              File where options are specified besides the  system  wide  file
28              /etc/nfstest,  user  wide  file $HOME/.nfstest or in the current
29              directory .nfstest file
30
31
32   NFS specific options:
33       -s SERVER, --server=SERVER
34              Server name or IP address
35
36       -e EXPORT, --export=EXPORT
37              Exported file system to mount [default: '/']
38
39       --nfsversion=NFSVERSION
40              NFS version, e.g., 3, 4, 4.1, etc. [default: 4.1]
41
42       -m MTPOINT, --mtpoint=MTPOINT
43              Mount point [default: '/mnt/t']
44
45       -p PORT, --port=PORT
46              NFS server port [default: 2049]
47
48       --proto=PROTO
49              NFS protocol name [default: 'tcp']
50
51       --sec=SEC
52              Security flavor [default: 'sys']
53
54       --nconnect=NCONNECT
55              Multiple TCP connections option [default: '1']
56
57       -o MTOPTS, --mtopts=MTOPTS
58              Mount options [default: 'hard,rsize=4096,wsize=4096']
59
60       --datadir=DATADIR
61              Data directory where files are created, directory is created  on
62              the mount point [default: '']
63
64
65   Logging options:
66       -v VERBOSE, --verbose=VERBOSE
67              Verbose      level      for     debug     messages     [default:
68              'opts|info|dbg1|dbg2|dbg3']
69
70       --tverbose=TVERBOSE
71              Verbose level for test messages [default: '1']
72
73       --createlog
74              Create log file
75
76       --rexeclog
77              Create rexec log files
78
79       --warnings
80              Display warnings
81
82       --tag=TAG
83              Informational tag, it is displayed as an INFO message  [default:
84              '']
85
86       --notty
87              Do not use terminal colors on output
88
89       --isatty
90              Use terminal colors on output -- useful when running with nohup
91
92
93   Packet trace options:
94       --createtraces
95              Create a packet trace for each test
96
97       --tbsize=TBSIZE
98              Capture buffer size for tcpdump [default: 192k]
99
100       --trcdelay=TRCDELAY
101              Seconds to delay before stopping packet trace [default: 2.0]
102
103       --keeptraces
104              Do not remove any trace files [default: remove trace files if no
105              errors]
106
107       --rmtraces
108              Remove trace files [default: remove trace files if no errors]
109
110       -i INTERFACE, --interface=INTERFACE
111              Device interface [default: automatically selected]
112
113
114   File options:
115       --nfiles=NFILES
116              Number of files to create [default: 2]
117
118       --filesize=FILESIZE
119              File size to use for test files [default: 64k]
120
121       --rsize=RSIZE
122              Read size to use when reading files [default: 4k]
123
124       --wsize=WSIZE
125              Write size to use when writing files [default: 4k]
126
127       --iodelay=IODELAY
128              Seconds to delay I/O operations [default: 0.1]
129
130       --offset-delta=OFFSET_DELTA
131              Read/Write offset delta [default: 4k]
132
133
134   Path options:
135       --sudo=SUDO
136              Full path of binary for sudo [default: '/usr/bin/sudo']
137
138       --kill=KILL
139              Full path of binary for kill [default: '/usr/bin/kill']
140
141       --nfsstat=NFSSTAT
142              Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
143
144       --tcpdump=TCPDUMP
145              Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
146
147       --iptables=IPTABLES
148              Full path of binary for iptables [default: '/usr/sbin/iptables']
149
150       --messages=MESSAGES
151              Full path of log messages file [default: '/var/log/messages']
152
153       --trcevents=TRCEVENTS
154              Full path of tracing events directory [default: '/sys/kernel/de‐
155              bug/tracing/events']
156
157       --trcpipe=TRCPIPE
158              Full  path of trace pipe file [default: '/sys/kernel/debug/trac‐
159              ing/trace_pipe']
160
161       --tmpdir=TMPDIR
162              Temporary directory [default: '/tmp']
163
164
165   Debug options:
166       --nocleanup
167              Do not cleanup created files
168
169       --notimestamps
170              Do not display timestamps in debug messages
171
172       --bugmsgs=BUGMSGS
173              File containing test messages to mark as bugs if they failed
174
175       --nomount
176              Do not mount server and run the tests on local disk space
177
178       --basename=BASENAME
179              Base name for all files and logs [default: automatically  gener‐
180              ated]
181
182       --nfsdebug=NFSDEBUG
183              Set NFS kernel debug flags and save log messages [default: '']
184
185       --rpcdebug=RPCDEBUG
186              Set RPC kernel debug flags and save log messages [default: '']
187
188       --tracepoints=TRACEPOINTS
189              List of trace points modules to enable [default: '']
190
191       --nfsstats
192              Get NFS stats [default: 'False']
193
194       --pktdisp
195              Display main packets related to the given test
196
197       --nfserrors
198              Fail every NFS error found in the packet trace
199
200       --client-ipaddr=CLIENT_IPADDR
201              IP address of localhost
202
203
204   Reporting options:
205       --xunit-report
206              Generate xUnit compatible test report
207
208       --xunit-report-file=XUNIT_REPORT_FILE
209              Path to xout report file
210
211
212   Test options:
213       --runtest=RUNTEST
214              Comma  separated list of tests to run, if list starts with a '^'
215              then all tests are run except the ones listed [default: 'all']
216

TESTS

218   access
219       Verify POSIX API access() on files with different modes.
220
221   chdir
222       Verify POSIX API chdir() by changing to a newly created directory
223       and then by changing back to the original directory.
224
225   close
226       Verify POSIX API close() works and that writing to a closed file
227       descriptor returns an error.
228
229   closedir
230       Verify POSIX API closedir() works
231
232   creat
233       Verify POSIX API creat(path, mode) is equivalent to
234       open(path, O_WRONLY|O_CREAT|O_TRUNC, mode). First test with a path
235       that does not exist to verify the file was created and then test
236       with a path that does exist to verify that the file is truncated.
237
238   fcntl
239       Verify the POSIX API fcntl() commands F_DUPFD, F_GETFD, F_SETFD,
240       F_GETFL, F_SETFL, and FD_CLOEXEC. The F_DUPFD command is tested
241       by performing operations on the original and dupped file descriptor
242       to ensure they behave correctly. The F_GETFD and F_SETFD commands
243       are tested by setting the FD_CLOEXEC flag and making sure it gets set.
244       The F_GETFL and F_SETFL commands are tested by setting the O_APPEND
245       flag and making sure it gets set.
246       Run the test for both 'read' and 'write'.
247
248   fdatasync
249       Verify POSIX API fdatasync().
250
251   fstat
252       Verify POSIX API fstat() by checking the mode on a file and that
253       it returns the expected structure members. Create a symlink and
254       verify that fstat returns information about the link.
255
256   fstatvfs
257       Verify POSIX API fstatvfs() by making sure all the members of the
258       structure are returned.
259
260   fsync
261       Verify POSIX API fsync().
262
263   link
264       Verify POSIX API link(src, dst) creates a link and updates
265       st_ctime field for the file. Verify that link updates the
266       st_ctime and st_mtime for the directory. Verify st_link count
267       incremented by 1 for the file.
268
269   lseek
270       Verify POSIX API lseek() with different offsets and whence
271       values including seeking past the end of the file.
272
273   lstat
274       Verify POSIX API lstat() by checking the mode on a file and that
275       it returns the expected structure members. Create a symlink and
276       verify that lstat returns information about the link.
277
278   mkdir
279       Verify POSIX API mkdir(). Verify that mkdir with a path of a symbolic
280       link fails. Verify that the st_ctime and st_mtime fields of the
281       parent directory are updated.
282
283   mmap
284       Verify POSIX API mmap() by mapping a file and verifying I/O
285       operations. Verify mmap followed by memory read of existing
286       file works. Verify mmap followed by memory write to file works.
287
288   munmap
289       Verify POSIX API munmap() by mapping a file and then unmapping
290       the file.
291
292   opendir
293       Verify POSIX API opendir() on a directory.
294
295   read
296       Verify POSIX API read() by reading data from a file. Verify that
297       the st_atime of the file is updated after the read. Verify a read
298       of 0 bytes returns 0.
299
300   readdir
301       Verify POSIX API readdir() on a directory.
302
303   readlink
304       Verify Test POSIX API readlink() by reading a symbolic link.
305
306   rename
307       Verify POSIX API rename() by renaming a file, directory, and a
308       symbolic link. Verify that a rename from a file to a symbolic
309       link will cause the symbolic link to be removed.
310
311   rewinddir
312       Verify POSIX API rewinddir() on a directory.
313
314   rmdir
315       Verify POSIX API rmdir() by removing a directory. Verify that the
316       parent's st_ctime and st_mtime are updated.
317
318   seekdir
319       Verify POSIX API seekdir() on a directory.
320
321   stat
322       Verify POSIX API stat() by checking the mode on a file and that
323       it returns the expected structure members. Create a symlink and
324       verify that stat returns information about the file.
325
326   statvfs
327       Verify POSIX API statvfs() by making sure all the members of the
328       structure are returned.
329
330   symlink
331       Verify POSIX API symlink() by creating a symbolic link and verify
332       that the file type is slnk.
333
334   sync
335       Verify POSIX API sync().
336
337   telldir
338       Verify POSIX API telldir() on a directory.
339
340   unlink
341       Verify POSIX API unlink() by unlinking a file and verify that it
342       was removed. Verify that the st_ctime and st_mtime fields of the
343       parent directory were updated. Then unlink a symbolic link and
344       verify that the symbolic link was removed but not the referenced
345       file. Then remove an opened file and verify that I/O still occurs
346       to the file after the unlink and that the file gets removed when
347       the file is closed. Create a file and then hard link to it so the
348       link count is greater than 1. Unlink the hard file and verify that
349       st_ctime field is updated.
350
351   write
352       Verify POSIX API write() by writing 0 bytes and verifying 0
353       is returned. Write a pattern the file, seek +N, write another
354       pattern, and close the file. Open the file and read in both
355       written patterns and verify that it is the correct pattern.
356       Read in the data from the hole in the file and verify that it is 0.
357
358   open
359       Verify POSIX API open() on a file. Verify file creation using
360       the O_CREAT flag and verifying the file mode is set to the
361       specified value. Verify the st_ctime and st_mtime are updated
362       on the parent directory after the file was created. Verify open
363       on existing file fails with the O_EXCL flag set. Verify write
364       succeeds and read fails if file was open with O_WRONLY. Verify
365       read succeeds and write fails if file was open with O_RDONLY.
366       Verify that all writes with O_APPEND set are to the end of the file.
367       Use O_DSYNC, O_RSYNC, and O_SYNC flags in open calls.
368       Verify file open with O_CREAT and O_TRUNC set will truncate an
369       existing file. Verify that it updates the file st_ctime and st_mtime.
370
371   chmod
372       Verify POSIX API chmod() on a file and directory by trying all valid
373       combinations of modes. Verify that the st_ctime files is updated
374       for both the file and directory.
375
376   all
377       Run all tests: access, chdir, close, closedir, creat, fcntl, fdatasync,
378       fstat, fstatvfs, fsync, link, lseek, lstat, mkdir, mmap, munmap,
379       opendir, read, readdir, readlink, rename, rewinddir, rmdir, seekdir,
380       stat, statvfs, symlink, sync, telldir, unlink, write, open, chmod
381

EXAMPLES

383       The only required option is --server
384       $ nfstest_posix --server 192.168.0.11
385

NOTES

387       The user id in the local host must have access to run commands as  root
388       using the 'sudo' command without the need for a password.
389

SEE ALSO

391       nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1), nfstest_dele‐
392       gation(1),  nfstest_dio(1),   nfstest_fcmp(1),   nfstest_file(1),   nf‐
393       stest_interop(1),  nfstest_io(1),  nfstest_lock(1), nfstest_pkt(1), nf‐
394       stest_pnfs(1), nfstest_rdma(1), nfstest_sparse(1), nfstest_ssc(1),  nf‐
395       stest_xattr(1),        nfstest_xid(1),        packet.nfs.nfs3_const(3),
396       packet.nfs.nfs4_const(3)
397
398

BUGS

400       No known bugs.
401

AUTHOR

403       Jorge Mora (mora@netapp.com)
404
405
406
407NFStest 3.2                      21 March 2023                NFSTEST_POSIX(1)
Impressum