1NFSTEST_SPARSE(1) nfstest_sparse 1.0 NFSTEST_SPARSE(1)
2
3
4
6 nfstest_sparse - Sparse file tests
7
9 nfstest_sparse --server <server> [options]
10
12 Verify correct functionality of sparse files. These are files which
13 have unallocated or uninitialized data blocks as holes. The new NFSv4.2
14 operation SEEK is used to search for the next hole or data segment in a
15 file.
16
17 Basic tests verify the SEEK operation returns the correct offset of the
18 next hole or data with respect to the starting offset given to the seek
19 system call. Verify the SEEK operation is sent to the server with the
20 correct stateid as a READ call. All files have a virtual hole at the
21 end of the file so when searching for the next hole, even if the file
22 does not have a hole, it returns the size of the file.
23
24 Some tests include testing at the protocol level by taking a packet
25 trace and inspecting the actual packets sent to the server.
26
27 Negative tests include trying to SEEK starting from an offset beyond
28 the end of the file.
29
30
31
33 --version
34 show program's version number and exit
35
36 -h, --help
37 show this help message and exit
38
39 -f FILE, --file=FILE
40 File where options are specified besides the system wide file
41 /etc/nfstest, user wide file $HOME/.nfstest or in the current
42 directory .nfstest file
43
44
45 NFS specific options:
46 -s SERVER, --server=SERVER
47 Server name or IP address
48
49 -e EXPORT, --export=EXPORT
50 Exported file system to mount [default: '/']
51
52 --nfsversion=NFSVERSION
53 NFS version, e.g., 3, 4, 4.1, etc. [default: 4.2]
54
55 -m MTPOINT, --mtpoint=MTPOINT
56 Mount point [default: '/mnt/t']
57
58 -p PORT, --port=PORT
59 NFS server port [default: 2049]
60
61 --proto=PROTO
62 NFS protocol name [default: 'tcp']
63
64 --sec=SEC
65 Security flavor [default: 'sys']
66
67 --nconnect=NCONNECT
68 Multiple TCP connections option [default: '1']
69
70 -o MTOPTS, --mtopts=MTOPTS
71 Mount options [default: 'hard,rsize=4096,wsize=4096']
72
73 --datadir=DATADIR
74 Data directory where files are created, directory is created on
75 the mount point [default: '']
76
77
78 Logging options:
79 -v VERBOSE, --verbose=VERBOSE
80 Verbose level for debug messages [default:
81 'opts|info|dbg1|dbg2|dbg3']
82
83 --tverbose=TVERBOSE
84 Verbose level for test messages [default: '1']
85
86 --createlog
87 Create log file
88
89 --rexeclog
90 Create rexec log files
91
92 --warnings
93 Display warnings
94
95 --tag=TAG
96 Informational tag, it is displayed as an INFO message [default:
97 '']
98
99 --notty
100 Do not use terminal colors on output
101
102 --isatty
103 Use terminal colors on output -- useful when running with nohup
104
105
106 Packet trace options:
107 --createtraces
108 Create a packet trace for each test
109
110 --tbsize=TBSIZE
111 Capture buffer size for tcpdump [default: 192k]
112
113 --trcdelay=TRCDELAY
114 Seconds to delay before stopping packet trace [default: 2.0]
115
116 --keeptraces
117 Do not remove any trace files [default: remove trace files if no
118 errors]
119
120 --rmtraces
121 Remove trace files [default: remove trace files if no errors]
122
123 -i INTERFACE, --interface=INTERFACE
124 Device interface [default: automatically selected]
125
126
127 File options:
128 --nfiles=NFILES
129 Number of files to create [default: 2]
130
131 --filesize=FILESIZE
132 File size to use for test files [default: 64k]
133
134 --rsize=RSIZE
135 Read size to use when reading files [default: 4k]
136
137 --wsize=WSIZE
138 Write size to use when writing files [default: 4k]
139
140 --iodelay=IODELAY
141 Seconds to delay I/O operations [default: 0.1]
142
143 --offset-delta=OFFSET_DELTA
144 Read/Write offset delta [default: 4k]
145
146
147 Path options:
148 --sudo=SUDO
149 Full path of binary for sudo [default: '/usr/bin/sudo']
150
151 --kill=KILL
152 Full path of binary for kill [default: '/usr/bin/kill']
153
154 --nfsstat=NFSSTAT
155 Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
156
157 --tcpdump=TCPDUMP
158 Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
159
160 --iptables=IPTABLES
161 Full path of binary for iptables [default: '/usr/sbin/iptables']
162
163 --messages=MESSAGES
164 Full path of log messages file [default: '/var/log/messages']
165
166 --trcevents=TRCEVENTS
167 Full path of tracing events directory [default: '/sys/kernel/de‐
168 bug/tracing/events']
169
170 --trcpipe=TRCPIPE
171 Full path of trace pipe file [default: '/sys/kernel/debug/trac‐
172 ing/trace_pipe']
173
174 --tmpdir=TMPDIR
175 Temporary directory [default: '/tmp']
176
177
178 Debug options:
179 --nocleanup
180 Do not cleanup created files
181
182 --notimestamps
183 Do not display timestamps in debug messages
184
185 --bugmsgs=BUGMSGS
186 File containing test messages to mark as bugs if they failed
187
188 --nomount
189 Do not mount server and run the tests on local disk space
190
191 --basename=BASENAME
192 Base name for all files and logs [default: automatically gener‐
193 ated]
194
195 --nfsdebug=NFSDEBUG
196 Set NFS kernel debug flags and save log messages [default: '']
197
198 --rpcdebug=RPCDEBUG
199 Set RPC kernel debug flags and save log messages [default: '']
200
201 --tracepoints=TRACEPOINTS
202 List of trace points modules to enable [default: '']
203
204 --nfsstats
205 Get NFS stats [default: 'False']
206
207 --pktdisp
208 Display main packets related to the given test
209
210 --nfserrors
211 Fail every NFS error found in the packet trace
212
213 --client-ipaddr=CLIENT_IPADDR
214 IP address of localhost
215
216
217 Reporting options:
218 --xunit-report
219 Generate xUnit compatible test report
220
221 --xunit-report-file=XUNIT_REPORT_FILE
222 Path to xout report file
223
224
225 Test options:
226 --runtest=RUNTEST
227 Comma separated list of tests to run, if list starts with a '^'
228 then all tests are run except the ones listed [default: 'all']
229
231 seek
232 Run all SEEK tests: seek01, seek02, seek03, seek04
233
234 seek01
235 Verify SEEK succeeds searching for the next data
236
237 seek02
238 Verify SEEK succeeds searching for the next hole
239
240 seek03
241 Verify SEEK searching for next data fails with ENXIO when offset is beyond the end of the file
242
243 seek04
244 Verify SEEK searching for next hole fails with ENXIO when offset is beyond the end of the file
245
246 all
247 Run all tests: seek01, seek02, seek03, seek04
248
250 The only required option is --server
251 $ nfstest_sparse --server 192.168.0.11
252
254 The user id in the local host must have access to run commands as root
255 using the 'sudo' command without the need for a password.
256
257 Valid only for NFS version 4.2 and above.
258
260 nfstest.test_util(3), nfstest.utils(3), nfstest_alloc(1), nf‐
261 stest_cache(1), nfstest_delegation(1), nfstest_dio(1), nfstest_fcmp(1),
262 nfstest_file(1), nfstest_interop(1), nfstest_io(1), nfstest_lock(1),
263 nfstest_pkt(1), nfstest_pnfs(1), nfstest_posix(1), nfstest_rdma(1), nf‐
264 stest_ssc(1), nfstest_xattr(1), nfstest_xid(1),
265 packet.nfs.nfs4_const(3)
266
267
269 No known bugs.
270
272 Jorge Mora (mora@netapp.com)
273
274
275
276NFStest 3.2 21 March 2023 NFSTEST_SPARSE(1)