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       -o MTOPTS, --mtopts=MTOPTS
55              Mount options [default: 'hard,rsize=4096,wsize=4096']
56
57       --datadir=DATADIR
58              Data directory where files are created, directory is created  on
59              the mount point [default: '']
60
61
62   Logging options:
63       -v VERBOSE, --verbose=VERBOSE
64              Verbose level for debug messages [default: 'none']
65
66       --tverbose=TVERBOSE
67              Verbose level for test messages [default: '1']
68
69       --createlog
70              Create log file
71
72       --rexeclog
73              Create rexec log files
74
75       --warnings
76              Display warnings
77
78       --tag=TAG
79              Informational  tag, it is displayed as an INFO message [default:
80              '']
81
82       --notty
83              Do not use terminal colors on output
84
85
86   Packet trace options:
87       --createtraces
88              Create a packet trace for each test
89
90       --tbsize=TBSIZE
91              Capture buffer size for tcpdump [default: 192k]
92
93       --trcdelay=TRCDELAY
94              Seconds to delay before stopping packet trace [default: 0.0]
95
96       --keeptraces
97              Do not remove any trace files [default: remove trace files if no
98              errors]
99
100       --rmtraces
101              Remove trace files [default: remove trace files if no errors]
102
103       -i INTERFACE, --interface=INTERFACE
104              Device interface [default: automatically selected]
105
106
107   File options:
108       --nfiles=NFILES
109              Number of files to create [default: 2]
110
111       --filesize=FILESIZE
112              File size to use for test files [default: 64k]
113
114       --rsize=RSIZE
115              Read size to use when reading files [default: 4k]
116
117       --wsize=WSIZE
118              Write size to use when writing files [default: 4k]
119
120       --iodelay=IODELAY
121              Seconds to delay I/O operations [default: 0.1]
122
123       --offset-delta=OFFSET_DELTA
124              Read/Write offset delta [default: 4k]
125
126
127   Path options:
128       --sudo=SUDO
129              Full path of binary for sudo [default: '/usr/bin/sudo']
130
131       --tcpdump=TCPDUMP
132              Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
133
134       --iptables=IPTABLES
135              Full path of binary for iptables [default: '/usr/sbin/iptables']
136
137       --messages=MESSAGES
138              Full path of log messages file [default: '/var/log/messages']
139
140       --tmpdir=TMPDIR
141              Temporary directory [default: '/tmp']
142
143
144   Debug options:
145       --nocleanup
146              Do not cleanup created files
147
148       --bugmsgs=BUGMSGS
149              File containing test messages to mark as bugs if they failed
150
151       --ignore
152              Ignore all bugs given by bugmsgs
153
154       --nomount
155              Do not mount server and run the tests on local disk space
156
157       --basename=BASENAME
158              Base  name for all files and logs [default: automatically gener‐
159              ated]
160
161       --nfsdebug=NFSDEBUG
162              Set NFS kernel debug flags and save log messages [default: '']
163
164       --rpcdebug=RPCDEBUG
165              Set RPC kernel debug flags and save log messages [default: '']
166
167       --pktdisp
168              Display main packets related to the given test
169
170
171   Test options:
172       --runtest=RUNTEST
173              Comma separated list of tests to run, if list starts with a  '^'
174              then all tests are run except the ones listed [default: 'all']
175

TESTS

177   access
178       Verify POSIX API access() on files with different modes.
179
180   chdir
181       Verify POSIX API chdir() by changing to a newly created directory
182       and then by changing back to the original directory.
183
184   close
185       Verify POSIX API close() works and that writing to a closed file
186       descriptor returns an error.
187
188   closedir
189       Verify POSIX API closedir() works and that reading to a closed file
190       descriptor returns an error.
191
192   creat
193       Verify POSIX API creat(path, mode) is equivalent to
194       open(path, O_WRONLY|O_CREAT|O_TRUNC, mode). First test with a path
195       that does not exist to verify the file was created and then test
196       with a path that does exist to verify that the file is truncated.
197
198   fcntl
199       Verify the POSIX API fcntl() commands F_DUPFD, F_GETFD, F_SETFD,
200       F_GETFL, F_SETFL, and FD_CLOEXEC. The F_DUPFD command is tested
201       by performing operations on the original and dupped file descriptor
202       to ensure they behave correctly. The F_GETFD and F_SETFD commands
203       are tested by setting the FD_CLOEXEC flag and making sure it gets set.
204       The F_GETFL and F_SETFL commands are tested by setting the O_APPEND
205       flag and making sure it gets set.
206       Run the test for both 'read' and 'write'.
207
208   fdatasync
209       Verify POSIX API fdatasync().
210
211   fstat
212       Verify POSIX API fstat() by checking the mode on a file and that
213       it returns the expected structure members. Create a symlink and
214       verify that fstat returns information about the link.
215
216   fstatvfs
217       Verify POSIX API fstatvfs() by making sure all the members of the
218       structure are returned.
219
220   fsync
221       Verify POSIX API fsync().
222
223   link
224       Verify POSIX API link(src, dst) creates a link and updates
225       st_ctime field for the file. Verify that link updates the
226       st_ctime and st_mtime for the directory. Verify st_link count
227       incremented by 1 for the file.
228
229   lseek
230       Verify POSIX API lseek() with different offsets and whence
231       values including seeking past the end of the file.
232
233   lstat
234       Verify POSIX API lstat() by checking the mode on a file and that
235       it returns the expected structure members. Create a symlink and
236       verify that lstat returns information about the link.
237
238   mkdir
239       Verify POSIX API mkdir(). Verify that mkdir with a path of a symbolic
240       link fails. Verify that the st_ctime and st_mtime fields of the
241       parent directory are updated.
242
243   mmap
244       Verify POSIX API mmap() by mapping a file and verifying I/O
245       operations. Verify mmap followed by memory read of existing
246       file works. Verify mmap followed by memory write to file works.
247
248   munmap
249       Verify POSIX API munmap() by mapping a file and then unmapping
250       the file.
251
252   opendir
253       Verify POSIX API opendir() on a directory.
254
255   read
256       Verify POSIX API read() by reading data from a file. Verify that
257       the st_atime of the file is updated after the read. Verify a read
258       of 0 bytes returns 0.
259
260   readdir
261       Verify POSIX API readdir() on a directory.
262
263   readlink
264       Verify Test POSIX API readlink() by reading a symbolic link.
265
266   rename
267       Verify POSIX API rename() by renaming a file, directory, and a
268       symbolic link. Verify that a rename from a file to a symbolic
269       link will cause the symbolic link to be removed.
270
271   rewinddir
272       Verify POSIX API rewinddir() on a directory.
273
274   rmdir
275       Verify POSIX API rmdir() by removing a directory. Verify that the
276       parent's st_ctime and st_mtime are updated.
277
278   seekdir
279       Verify POSIX API seekdir() on a directory.
280
281   stat
282       Verify POSIX API stat() by checking the mode on a file and that
283       it returns the expected structure members. Create a symlink and
284       verify that stat returns information about the file.
285
286   statvfs
287       Verify POSIX API statvfs() by making sure all the members of the
288       structure are returned.
289
290   symlink
291       Verify POSIX API symlink() by creating a symbolic link and verify
292       that the file type is slnk.
293
294   sync
295       Verify POSIX API sync().
296
297   telldir
298       Verify POSIX API telldir() on a directory.
299
300   unlink
301       Verify POSIX API unlink() by unlinking a file and verify that it
302       was removed. Verify that the st_ctime and st_mtime fields of the
303       parent directory were updated. Then unlink a symbolic link and
304       verify that the symbolic link was removed but not the referenced
305       file. Then remove an opened file and verify that I/O still occurs
306       to the file after the unlink and that the file gets removed when
307       the file is closed. Create a file and then hard link to it so the
308       link count is greater than 1. Unlink the hard file and verify that
309       st_ctime field is updated.
310
311   write
312       Verify POSIX API write() by writing 0 bytes and verifying 0
313       is returned. Write a pattern the file, seek +N, write another
314       pattern, and close the file. Open the file and read in both
315       written patterns and verify that it is the correct pattern.
316       Read in the data from the hole in the file and verify that it is 0.
317
318   open
319       Verify POSIX API open() on a file. Verify file creation using
320       the O_CREAT flag and verifying the file mode is set to the
321       specified value. Verify the st_ctime and st_mtime are updated
322       on the parent directory after the file was created. Verify open
323       on existing file fails with the O_EXCL flag set. Verify write
324       succeeds and read fails if file was open with O_WRONLY. Verify
325       read succeeds and write fails if file was open with O_RDONLY.
326       Verify that all writes with O_APPEND set are to the end of the file.
327       Use O_DSYNC, O_RSYNC, and O_SYNC flags in open calls.
328       Verify file open with O_CREAT and O_TRUNC set will truncate an
329       existing file. Verify that it updates the file st_ctime and st_mtime.
330
331   chmod
332       Verify POSIX API chmod() on a file and directory by trying all valid
333       combinations of modes. Verify that the st_ctime files is updated
334       for both the file and directory.
335

EXAMPLES

337       The only required option is --server
338       $ nfstest_posix --server 192.168.0.11
339

NOTES

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

SEE ALSO

345       nfstest.test_util(3), nfstest_alloc(1), nfstest_cache(1), nfstest_dele‐
346       gation(1),    nfstest_dio(1),    nfstest_file(1),   nfstest_interop(1),
347       nfstest_io(1),   nfstest_lock(1),   nfstest_pkt(1),    nfstest_pnfs(1),
348       nfstest_sparse(1), nfstest_ssc(1), nfstest_xid(1)
349
350

BUGS

352       No known bugs.
353

AUTHOR

355       Jorge Mora (mora@netapp.com)
356
357
358
359NFStest 2.1.5                  14 February 2017               NFSTEST_POSIX(1)
Impressum