NFSTEST_DELEGATION(1)
π NFSTEST_DELEGATION π
okay bestie, welcome to nfstest_delegation β it's the nfstest_delegation 1.8 manual page and it is so much, but I got you. this is part 1 of 2 so buckle up, we're not even done yet β¨
πΈ NAME πΈ
nfstest_delegation β Delegation tests π¦
β¨ SYNOPSIS β¨
nfstest_delegation --server <server> [--client <client>] [options]
π DESCRIPTION π
okay so first up we got the basic delegation tests and they verify that a correct delegation is granted when you open a file for reading or writing. also, like, another OPEN should not be sent for the same file when the client is holding a delegation, periodt. then we verify that the stateid of all I/O operations should be the delegation stateid β no cap. reads from a different process on the same file should not cause the client to send additional READ packets when the client is holding a read delegation. and furthermore π , a LOCK packet should not be sent to the server when the client is holding a delegation.
then we get to the recall delegation tests π«Ά and these verify the delegation is recalled when a conflicting operation is sent to the server from a different client. the conflicting operations are: reading, writing, removing, renaming, and changing the permissions on the same file. note bestie: reading a file from a different client can only recall a write delegation. removing the delegated file from a different client recalls the delegation and the server may or may not allow any more writes from the client after the delegation has been returned. renaming either the delegated file (as source) or into the delegated file (as target) recalls the delegation. in the case where the delegated file is the target of rename, the existing target is removed before the rename occurs, therefore the server may or may not allow any more writes from the client after the delegation has been removed β just like in the case when removing the delegated file. it's giving the same energy fr fr π
also β¨, verify that a read delegation is not recalled when a different client is granted a read delegation. after a delegation is recalled, the client may send an OPEN with CLAIM_DELEGATE_CUR before returning the delegation, specially when there is an open pending on the client. in addition, the stateid returned by the new open should be the same as the original OPEN stateid. also, a delegation should not be granted when re-opening the file before returning the delegation. the client may flush all written data before returning the WRITE delegation. the LOCK should be sent as well before returning a delegation which has been recalled. finally, a delegation should not be granted on the second client who caused the delegation recall on the first client. iconic behavior honestly π
π OPTIONS π
--versionβ show the program's version number and dip out π«‘-h,--helpβ show this help message and exit-f FILE,--file=FILEβ the file where options are specified, besides the system wide file/etc/nfstest, the user wide file$HOME/.nfstest, or the.nfstestfile in the current directory
π NFS specific options π
-s SERVER,--server=SERVERβ server name or IP address-e EXPORT,--export=EXPORTβ exported file system to mount [default:'/']--nfsversion=NFSVERSIONβ NFS version, e.g.,3,4,4.1, etc. [default:4.1]-m MTPOINT,--mtpoint=MTPOINTβ mount point [default:'/mnt/t']-p PORT,--port=PORTβ NFS server port [default:2049]--proto=PROTOβ NFS protocol name [default:'tcp']--sec=SECβ security flavor [default:'sys']--nconnect=NCONNECTβ multiple TCP connections option [default:'1']-o MTOPTS,--mtopts=MTOPTSβ mount options [default:'hard,rsize=4096,wsize=4096']--datadir=DATADIRβ data directory where files are created, the directory is created on the mount point [default:'']
π Logging options π
-v VERBOSE,--verbose=VERBOSEβ verbose level for debug messages [default:'opts|info|dbg1|dbg2|dbg3']--tverbose=TVERBOSEβ verbose level for test messages [default:'1']--createlogβ create log file--rexeclogβ create rexec log files--warningsβ display warnings--tag=TAGβ informational tag, it is displayed as an INFO message [default:'']--nottyβ do not use terminal colors on output--isattyβ use terminal colors on output β useful when running withnohup
π¦ Packet trace options π¦
--createtracesβ create a packet trace for each test--tbsize=TBSIZEβ capture buffer size fortcpdump[default:192k]--trcdelay=TRCDELAYβ seconds to delay before stopping packet trace [default:2.0]--keeptracesβ do not remove any trace files [default: remove trace files if no errors]--rmtracesβ remove trace files [default: remove trace files if no errors]-i INTERFACE,--interface=INTERFACEβ device interface [default: automatically selected]
π§ File options π§
--nfiles=NFILESβ number of files to create [default:2]--filesize=FILESIZEβ file size to use for test files [default:64k]--rsize=RSIZEβ read size to use when reading files [default:4k]--wsize=WSIZEβ write size to use when writing files [default:4k]--iodelay=IODELAYβ seconds to delay I/O operations [default:0.1]--offset-delta=OFFSET_DELTAβ read/write offset delta [default:4k]
π Path options π
--sudo=SUDOβ full path of binary forsudo[default:'/usr/bin/sudo']--kill=KILLβ full path of binary forkill[default:'/usr/bin/kill']--nfsstat=NFSSTATβ full path of binary fornfsstat[default:'/usr/sbin/nfsstat']--tcpdump=TCPDUMPβ full path of binary fortcpdump[default:'/usr/sbin/tcpdump']--iptables=IPTABLESβ full path of binary foriptables[default:'/usr/sbin/iptables']--messages=MESSAGESβ full path of log messages file [default:'/var/log/messages']--trcevents=TRCEVENTSβ full path of tracing events directory [default:'/sys/kernel/debug/tracing/events']--trcpipe=TRCPIPEβ full path of trace pipe file [default:'/sys/kernel/debug/tracing/trace_pipe']--tmpdir=TMPDIRβ temporary directory [default:'/tmp']
π Debug options π
--nocleanupβ do not cleanup created files--notimestampsβ do not display timestamps in debug messages--bugmsgs=BUGMSGSβ file containing test messages to mark as bugs if they failed--nomountβ do not mount server and run the tests on local disk space--basename=BASENAMEβ base name for all files and logs [default: automatically generated]--nfsdebug=NFSDEBUGβ set NFS kernel debug flags and save log messages [default:'']--rpcdebug=RPCDEBUGβ set RPC kernel debug flags and save log messages [default:'']--tracepoints=TRACEPOINTSβ list of trace points modules to enable [default:'']--nfsstatsβ get NFS stats [default:'False']--pktdispβ display main packets related to the given test--nfserrorsβ fail every NFS error found in the packet trace--client-ipaddr=CLIENT_IPADDRβ IP address of localhost
β Reporting options β
--xunit-reportβ generate xUnit compatible test report--xunit-report-file=XUNIT_REPORT_FILEβ path to xout report file
π Test options π
--runtest=RUNTESTβ comma separated list of tests to run; if the list starts with a'^'then all tests are run except the ones listed [default:'all']--client=CLIENTβ remote NFS client and options used for recall delegation tests. clients are separated by a','and each client definition is a list of arguments separated by a':', given in the following order if positional arguments is used (see examples):
clientname:server:export:nfsversion:port:proto:sec:mtpoint
[default: 'nfsversion=3:proto=tcp:port=2049']
--client-nfsvers=CLIENT_NFSVERSβ comma separated list of valid NFS versions to use in the--clientoption. an NFS version from this list, which is different than that given by--nfsversion, is selected and included in the--clientoption [default:4.0,4.1]--lock-offset=LOCK_OFFSETβ starting offset for lock [default:0]--lock-poffset=LOCK_POFFSETβ starting offset for lock on pending open [default:8192]--lock-len=LOCK_LENβ number of bytes to lock [default:4096]--truncateβ truncate file when writing from the second file for the recall tests--setup-delay=SETUP_DELAYβ seconds to delay after setup so all opens are released [default:4.0]
bestie this is only part 1 π more manual page incoming, don't go anywhere π
π§ͺ TESTS π§ͺ
okay bestie, this is the whole test menu β every single test you can run, and what it does. no skipping, we're doing all of them π
basicβ Run all basic delegation tests:basic01,basic02,basic03,basic04,basic05,basic06,basic07,basic08,basic09,basic10,basic11,basic12statβ Run all basic delegation tests with file stat:basic03,basic04,basic09,basic10lockβ Run all basic delegation tests with file lock:basic05,basic06,basic11,basic12basic01β Basic read delegation testbasic02β Basic write delegation testbasic03β Basic read delegation test with file statbasic04β Basic write delegation test with file statbasic05β Basic read delegation test with file lockbasic06β Basic write delegation test with file lockbasic07β Basic write delegation test using RDWR open while readingbasic08β Basic write delegation test using RDWR open while writingbasic09β Basic write delegation test using RDWR open while reading with file statbasic10β Basic write delegation test using RDWR open while writing with file statbasic11β Basic write delegation test using RDWR open while reading with file lockbasic12β Basic write delegation test using RDWR open while writing with file lockrecallβ Run all recall delegation tests:recall01,recall02,recall03,recall04,recall05,recall06,recall07,recall08,recall09,recall10,recall11,recall12,recall13,recall14,recall15,recall16,recall17,recall18,recall19,recall20,recall21,recall22,recall23,recall24,recall25,recall26,recall27,recall28,recall29,recall30,recall31,recall32,recall33,recall34,recall35,recall36,recall37,recall38,recall39,recall40,recall41,recall42,recall43,recall44,recall45,recall46,recall47,recall48,recall49,recall50,recall51,recall52,recall53,recall54setattrβ Run all tests using SETATTR to recall the delegation:recall07,recall08,recall09,recall10,recall35,recall36,recall37,recall38removeβ Run all tests recalling the delegation by removing the delegated file:recall11,recall12,recall13,recall14,recall39,recall40,recall41,recall42renameβ Run all tests recalling the delegation by renaming the delegated file:recall15,recall16,recall17,recall18,recall19,recall20,recall21,recall22,recall43,recall44,recall45,recall46,recall47,recall48,recall49,recall50pendingβ Run all recall delegation tests having a pending open:recall23,recall24,recall25,recall26,recall51,recall52,recall53,recall54recall01β Recall read delegation by writing from a second clientrecall02β Recall write delegation by writing from a second clientrecall03β Recall read delegation by writing from a second client with file lockrecall04β Recall write delegation by writing from a second client with file lockrecall05β Recall write delegation by reading from a second clientrecall06β Recall write delegation by reading from a second client with file lockrecall07β Recall read delegation by changing the permissions to the filerecall08β Recall write delegation by changing the permissions to the filerecall09β Recall read delegation by changing the permissions to the file with file lockrecall10β Recall write delegation by changing the permissions to the file with file lockrecall11β Recall read delegation by removing the filerecall12β Recall write delegation by removing the filerecall13β Recall read delegation by removing the file with file lockrecall14β Recall write delegation by removing the file with file lockrecall15β Recall read delegation by renaming the filerecall16β Recall write delegation by renaming the filerecall17β Recall read delegation by renaming the file with file lockrecall18β Recall write delegation by renaming the file with file lockrecall19β Recall read delegation by renaming into the filerecall20β Recall write delegation by renaming into the filerecall21β Recall read delegation by renaming into the file with file lockrecall22β Recall write delegation by renaming into the file with file lockrecall23β Recall read delegation by writing from a second client with file lock, having a pending read openrecall24β Recall read delegation by writing from a second client with file lock, having a pending write open. Delegation is returned by the client when the second open is done so there is no delegation recallrecall25β Recall write delegation by writing from a second client with file lock, having a pending read openrecall26β Recall write delegation by writing from a second client with file lock, having a pending write openrecall27β Recall write delegation by reading from a second client using RDWR open while readingrecall28β Recall write delegation by reading from a second client using RDWR open while writingrecall29β Recall write delegation by writing from a second client using RDWR open while readingrecall30β Recall write delegation by writing from a second client using RDWR open while writingrecall31β Recall write delegation by reading from a second client using RDWR open while reading with file lockrecall32β Recall write delegation by reading from a second client using RDWR open while writing with file lockrecall33β Recall write delegation by writing from a second client using RDWR open while reading with file lockrecall34β Recall write delegation by writing from a second client using RDWR open while writing with file lockrecall35β Recall write delegation by changing the permissions to the file from a second client using RDWR open while readingrecall36β Recall write delegation by changing the permissions to the file from a second client using RDWR open while writingrecall37β Recall write delegation by changing the permissions to the file from a second client using RDWR open while reading with file lockrecall38β Recall write delegation by changing the permissions to the file from a second client using RDWR open while writing with file lockrecall39β Recall write delegation by removing the file from a second client using RDWR open while readingrecall40β Recall write delegation by removing the file from a second client using RDWR open while writingrecall41β Recall write delegation by removing the file from a second client using RDWR open while reading with file lockrecall42β Recall write delegation by removing the file from a second client using RDWR open while writing with file lockrecall43β Recall write delegation by renaming the file from a second client using RDWR open while readingrecall44β Recall write delegation by renaming the file from a second client using RDWR open while writingrecall45β Recall write delegation by renaming the file from a second client using RDWR open while reading with file lockrecall46β Recall write delegation by renaming the file from a second client using RDWR open while writing with file lockrecall47β Recall write delegation by renaming the file from a second client using RDWR open while readingrecall48β Recall write delegation by renaming the file from a second client using RDWR open while writingrecall49β Recall write delegation by renaming the file from a second client using RDWR open while reading with file lockrecall50β Recall write delegation by renaming the file from a second client using RDWR open while writing with file lockrecall51β Recall write delegation by writing from a second client using RDWR open while reading with file lock, having a pending read openrecall52β Recall write delegation by writing from a second client using RDWR open while reading with file lock, having a pending write openrecall53β Recall write delegation by writing from a second client using RDWR open while writing with file lock, having a pending read openrecall54β Recall write delegation by writing from a second client using RDWR open while writing with file lock, having a pending write openread_delegβ Run all read delegation tests:basic01,basic03,basic05,recall01,recall03,recall07,recall09,recall11,recall13,recall15,recall17,recall19,recall21,recall23,recall24write_delegβ Run all write delegation tests:basic02,basic04,basic06,basic07,basic08,basic09,basic10,basic11,basic12,recall02,recall04,recall05,recall06,recall08,recall10,recall12,recall14,recall16,recall18,recall20,recall22,recall25,recall26,recall27,recall28,recall29,recall30,recall31,recall32,recall33,recall34,recall35,recall36,recall37,recall38,recall39,recall40,recall41,recall42,recall43,recall44,recall45,recall46,recall47,recall48,recall49,recall50,recall51,recall52,recall53,recall54allβ Run all tests:basic01,basic02,basic03,basic04,basic05,basic06,basic07,basic08,basic09,basic10,basic11,basic12,recall01,recall02,recall03,recall04,recall05,recall06,recall07,recall08,recall09,recall10,recall11,recall12,recall13,recall14,recall15,recall16,recall17,recall18,recall19,recall20,recall21,recall22,recall23,recall24,recall25,recall26,recall27,recall28,recall29,recall30,recall31,recall32,recall33,recall34,recall35,recall36,recall37,recall38,recall39,recall40,recall41,recall42,recall43,recall44,recall45,recall46,recall47,recall48,recall49,recall50,recall51,recall52,recall53,recall54
π EXAMPLES π
okay so here's how you actually run this thing, bestie π
Run the basic delegation tests (no client option):
nfstest_delegation --server 192.168.0.2 --export /exports
Use short options instead:
nfstest_delegation -s 192.168.0.2 -e /exports
Run both the basic and recall tests using positional arguments with nfsversion=3 for the second client:
nfstest_delegation -s 192.168.0.2 -e /exports --client 192.168.0.10:::3
Use named arguments instead:
nfstest_delegation -s 192.168.0.2 -e /exports --client 192.168.0.10:nfsversion=3
π NOTES π
The user id in the local host and the host specified by --client must have access to run commands as root using the sudo command without the need for a password.
The user id must be able to ssh to remote host without the need for a password.
no cap, those two things are non-negotiable β set up your ssh keys and passwordless sudo first or you're gonna have a bad time π
π SEE ALSO π
nfstest.test_util(3)nfstest_alloc(1)nfstest_cache(1)nfstest_dio(1)nfstest_fcmp(1)nfstest_file(1)nfstest_interop(1)nfstest_io(1)nfstest_lock(1)nfstest_pkt(1)nfstest_pnfs(1)nfstest_posix(1)nfstest_rdma(1)nfstest_sparse(1)nfstest_ssc(1)nfstest_xattr(1)nfstest_xid(1)packet.nfs.nfs3_const(3)packet.nfs.nfs4_const(3)
π BUGS π
No known bugs.
periodt. flawless behavior only π
π AUTHOR π
Jorge Mora (mora@netapp.com)
and that's a wrap on this whole page, bestie! this was NFStest 3.2, dated 21 March 2023 β go forth and delegate like the main character you are π¦β¨
π¦ where this page comes from
- debian trixie: nfstest 3.2-3
- fedora 43: NFStest 3.2-14.fc43 Β· GPL-2.0-or-later
- fedora 44: NFStest 3.2-16.fc44 Β· GPL-2.0-or-later
- ubuntu noble: nfstest 3.2-2
- ubuntu questing: nfstest 3.2-3
- ubuntu resolute: nfstest 3.2-3build1
- ubuntu stonking: nfstest 3.2-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms