NFSTEST_XATTR(1)
πΈ NFSTEST_XATTR π
okay so bestie, this is nfstest_xattr, it lives in section 1 of the manual, and it's version nfstest_xattr 1.1. it's giving very much "let's verify extended attributes and have a whole journey about it" energy, and honestly? we love that for us.
β¨ NAME β¨
nfstest_xattr β Extended Attributes tests π
π¦ SYNOPSIS π¦
nfstest_xattr --server <server> [options]
π DESCRIPTION π
okay so first thing first, the whole point: verify correct functionality of extended attributes. that's the vibe check, that's the assignment. π₯
so like, extended attributes are these name:value pairs that are permanently associated with files and directories, kinda like how environment strings are associated with a process, iykyk. an attribute can be defined or undefined. and if it is defined, its value can be empty or non-empty, both are valid, no drama. extended attributes are basically extensions to the normal attributes that get associated with all inodes in the system, and they're often used to give a filesystem some extra functionality. iconic behavior tbh.
the tests are divided into five groups: getxattr, setxattr, removexattr, listxattr and cinfo. let me break it down:
- the
getxattrtests verify the retrieval of extended attribute values π - the
setxattrtests verify the creation or modification of extended attributes β¨ - the
removexattrtests verify the removal of extended attributes ποΈ - the
listxattrtests verify the listing of extended attributes π - and finally, the
cinfotests verify the change info returned by the server is correct when the file is either modified or not from a different client π§
and bestie, there's more. when a different client is holding a read delegation, we verify the delegation is recalled only when creating, modifying or removing an extended attribute. on the other hand, verify the read delegation is not recalled when listing attributes or retrieving their values. the way that distinction matters... main character energy fr fr. π
negative testing is included too, like retrieval or removal of an extended attribute name which does not exist. creating an attribute which already exists should fail while using XATTR_CREATE flag. trying to modify an attribute which does not exist should fail if using XATTR_REPLACE flag. yes we test the fails too, we contain multitudes. π
π OPTIONS π
--versionβ show program's version number and exit, cute and simple π«-h,--helpβ show this help message and exit, the classic "help me help you" move π«Ά-f FILE,--file=FILEβ File where options are specified besides the system wide file/etc/nfstest, user wide file$HOME/.nfstestor in the current directory.nfstestfile. so you got layers of config files, so many places to stash your options π
πΈ 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.2]-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, 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 anINFOmessage [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 list starts with a^then all tests are run except the ones listed [default:all]--num-xattrs=NUM_XATTRSβ Number of extended attributes to create forlistxattrtests with many attributes [default:20]--client=CLIENTβ Remote NFS client and options used for 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]
π§ͺ TESTS π§ͺ
Okay bestie, this is the whole test menu. Every single one is listed, no skips, no cap. β¨
ngetxattr01
Verify getting extended attribute. simple, clean, iconic. π
ngetxattr02
Verify getting extended attribute fails when attribute does not exist. the βwhere is it thoβ test. π
dgetxattr01
Verify getting extended attribute β when delegation is granted on second client. π
dgetxattr02
Verify getting extended attribute fails when attribute does not exist β when delegation is granted on second client. π¦
nsetxattr01
Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist. either way, we ball. β¨
nsetxattr02
Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist. create the thing. π±
nsetxattr03
Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist. canβt replace what isnβt there, bestie. π
nsetxattr04
Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists. already here, still valid. π
nsetxattr05
Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists. no duplicates, periodt. π
ββοΈ
nsetxattr06
Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists. swap it out, slay. π
dsetxattr01
Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist β when delegation is granted on second client. π
dsetxattr02
Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist β when delegation is granted on second client. π§
dsetxattr03
Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist β when delegation is granted on second client. π
dsetxattr04
Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists β when delegation is granted on second client. π
dsetxattr05
Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists β when delegation is granted on second client. π«Ά
dsetxattr06
Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists β when delegation is granted on second client. π
nremovexattr01
Verify removing extended attribute. bye-bye, attribute. π
nremovexattr02
Verify removing extended attribute fails when attribute does not exist. nothing to remove, bestie. π
dremovexattr01
Verify removing extended attribute β when delegation is granted on second client. π¦
dremovexattr02
Verify removing extended attribute fails when attribute does not exist β when delegation is granted on second client. π
nlistxattr01
Verify listing extended attributes with no user namespace attributes. empty list, but make it fashion. β¨
nlistxattr02
Verify listing extended attribute. just show me the list. π
nlistxattr03
Verify listing extended attribute (many attributes). so many attributes, so little time. π₯
dlistxattr01
Verify listing extended attributes with no user namespace attributes β when delegation is granted on second client. πΈ
dlistxattr02
Verify listing extended attribute β when delegation is granted on second client. π
dlistxattr03
Verify listing extended attribute (many attributes) β when delegation is granted on second client. π
ncinfo01
Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist. change info, but make it either. π
ncinfo02
Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists. either again, but now it exists. π
ncinfo03
Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist. create and inform. π±
ncinfo04
Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists. replace and inform. π
mcinfo01
Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist β when file is modified on second client. π
mcinfo02
Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists β when file is modified on second client. π§
mcinfo03
Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist β when file is modified on second client. β¨
mcinfo04
Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists β when file is modified on second client. π
getxattr
Run all GETXATTR tests: ngetxattr01, ngetxattr02, dgetxattr01, dgetxattr02. the whole GETXATTR crew. π
ngetxattr
Run all GETXATTR tests when no open on second client: ngetxattr01, ngetxattr02. π¦
dgetxattr
Run all GETXATTR tests when delegation is granted on second client: dgetxattr01, dgetxattr02. π
setxattr
Run all SETXATTR tests: nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06, dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06. all the SETXATTR energy. π₯
nsetxattr
Run all SETXATTR tests when no open on second client: nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06. πΈ
dsetxattr
Run all SETXATTR tests when delegation is granted on second client: dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06. π
removexattr
Run all REMOVEXATTR tests: nremovexattr01, nremovexattr02, dremovexattr01, dremovexattr02. bye to all the attrs. π
nremovexattr
Run all REMOVEXATTR tests when no open on second client: nremovexattr01, nremovexattr02. π
dremovexattr
Run all REMOVEXATTR tests when delegation is granted on second client: dremovexattr01, dremovexattr02. π¦
listxattr
Run all LISTXATTRS tests: nlistxattr01, nlistxattr02, nlistxattr03, dlistxattr01, dlistxattr02, dlistxattr03. list them all, bestie. π
nlistxattr
Run all LISTXATTRS tests when no open on second client: nlistxattr01, nlistxattr02, nlistxattr03. πΈ
dlistxattr
Run all LISTXATTRS tests when delegation is granted on second client: dlistxattr01, dlistxattr02, dlistxattr03. β¨
cinfo
Run all CINFO tests: ncinfo01, ncinfo02, ncinfo03, ncinfo04, mcinfo01, mcinfo02, mcinfo03, mcinfo04. change info overload. π
ncinfo
Run all CINFO tests when no open on second client: ncinfo01, ncinfo02, ncinfo03, ncinfo04. π
mcinfo
Run all CINFO tests when file is modified on second client: mcinfo01, mcinfo02, mcinfo03, mcinfo04. π
all
Run all tests: ngetxattr01, ngetxattr02, dgetxattr01, dgetxattr02, nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06, dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06, nremovexattr01, nremovexattr02, dremovexattr01, dremovexattr02, nlistxattr01, nlistxattr02, nlistxattr03, dlistxattr01, dlistxattr02, dlistxattr03, ncinfo01, ncinfo02, ncinfo03, ncinfo04, mcinfo01, mcinfo02, mcinfo03, mcinfo04. literally every single one. main character energy. π
π EXAMPLES π
The only required option is --server β thatβs it, bestie. β¨
$ nfstest_xattr --server 192.168.0.11
π NOTES π
Heads up, queen: the user id in the local host and the host specified by--clientmust have access to run commands as root using thesudocommand without the need for a password.
The user id must be able to ssh to remote host without the need for a password.
Valid only for NFS version 4.2 and above. so check ur NFS version, fr.
π SEE ALSO π
baseobj(3)formatstr(3)nfstest.test_util(3)nfstest_alloc(1)nfstest_cache(1)nfstest_delegation(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_xid(1)packet.nfs.nfs4_const(3)
π BUGS π
No known bugs. we love a clean sheet. π
π AUTHOR π
Jorge Mora (mora@netapp.com) β the icon who wrote this. π
Thatβs the whole vibe, bestie. This was NFStest 3.2, dated 21 March 2023, and you just read NFSTEST_XATTR(1). Byeee! π¦β¨
π¦ 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