Scroll to navigation

NFSTEST_XATTR(1) nfstest_xattr 1.1 NFSTEST_XATTR(1)

NAME

nfstest_xattr - Extended Attributes tests

SYNOPSIS

nfstest_xattr --server <server> [options]

DESCRIPTION

Verify correct functionality of extended attributes

Extended attributes are name:value pairs associated permanently with files and directories, similar to the environment strings associated with a process. An attribute may be defined or undefined. If it is defined, its value may be empty or non-empty. Extended attributes are extensions to the normal attributes which are associated with all inodes in the system. They are often used to provide additional functionality to a filesystem.

Tests are divided into five groups: getxattr, setxattr, removexattr, listxattr and cinfo. The getxattr tests verify the retrieval of extended attribute values. The setxattr tests verify the creation or modification of extended attributes. The removexattr tests verify the removal of extended attributes. The listxattr tests verify the listing of extended attributes. And finally, the cinfo tests verify the change info returned by the server is correct when the file is either modified or not from a different client.

Furthermore, when a different client is holding a read delegation, 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.

Negative testing is included 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.

OPTIONS

show program's version number and exit
show this help message and exit
File where options are specified besides the system wide file /etc/nfstest, user wide file $HOME/.nfstest or in the current directory .nfstest file

NFS specific options:

Server name or IP address
Exported file system to mount [default: '/']
NFS version, e.g., 3, 4, 4.1, etc. [default: 4.2]
Mount point [default: '/mnt/t']
NFS server port [default: 2049]
NFS protocol name [default: 'tcp']
Security flavor [default: 'sys']
Multiple TCP connections option [default: '1']
Mount options [default: 'hard,rsize=4096,wsize=4096']
Data directory where files are created, directory is created on the mount point [default: '']

Logging options:

Verbose level for debug messages [default: 'opts|info|dbg1|dbg2|dbg3']
Verbose level for test messages [default: '1']
Create log file
Create rexec log files
Display warnings
Informational tag, it is displayed as an INFO message [default: '']
Do not use terminal colors on output
Use terminal colors on output -- useful when running with nohup

Packet trace options:

Create a packet trace for each test
Capture buffer size for tcpdump [default: 192k]
Seconds to delay before stopping packet trace [default: 2.0]
Do not remove any trace files [default: remove trace files if no errors]
Remove trace files [default: remove trace files if no errors]
Device interface [default: automatically selected]

File options:

Number of files to create [default: 2]
File size to use for test files [default: 64k]
Read size to use when reading files [default: 4k]
Write size to use when writing files [default: 4k]
Seconds to delay I/O operations [default: 0.1]
Read/Write offset delta [default: 4k]

Path options:

Full path of binary for sudo [default: '/usr/bin/sudo']
Full path of binary for kill [default: '/usr/bin/kill']
Full path of binary for nfsstat [default: '/usr/sbin/nfsstat']
Full path of binary for tcpdump [default: '/usr/sbin/tcpdump']
Full path of binary for iptables [default: '/usr/sbin/iptables']
Full path of log messages file [default: '/var/log/messages']
Full path of tracing events directory [default: '/sys/kernel/debug/tracing/events']
Full path of trace pipe file [default: '/sys/kernel/debug/tracing/trace_pipe']
Temporary directory [default: '/tmp']

Debug options:

Do not cleanup created files
Do not display timestamps in debug messages
File containing test messages to mark as bugs if they failed
Do not mount server and run the tests on local disk space
Base name for all files and logs [default: automatically generated]
Set NFS kernel debug flags and save log messages [default: '']
Set RPC kernel debug flags and save log messages [default: '']
List of trace points modules to enable [default: '']
Get NFS stats [default: 'False']
Display main packets related to the given test
Fail every NFS error found in the packet trace
IP address of localhost

Reporting options:

Generate xUnit compatible test report
Path to xout report file

Test options:

Comma separated list of tests to run, if list starts with a '^' then all tests are run except the ones listed [default: 'all']
Number of extended attributes to create for listxattr tests with many attributes [default: 20]
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']
Comma separated list of valid NFS versions to use in the --client option. An NFS version from this list, which is different than that given by --nfsversion, is selected and included in the --client option [default: 4.0,4.1]

TESTS

ngetxattr01

Verify getting extended attribute

ngetxattr02

Verify getting extended attribute fails when attribute does not exist

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

nsetxattr02

Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist

nsetxattr03

Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist

nsetxattr04

Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists

nsetxattr05

Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists

nsetxattr06

Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists

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

nremovexattr02

Verify removing extended attribute fails when attribute does not exist

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

nlistxattr02

Verify listing extended attribute

nlistxattr03

Verify listing extended attribute (many attributes)

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

ncinfo02

Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists

ncinfo03

Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist

ncinfo04

Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists

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

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

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

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

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

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

EXAMPLES

The only required option is --server
$ nfstest_xattr --server 192.168.0.11

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.

Valid only for NFS version 4.2 and above.

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.

AUTHOR

Jorge Mora (mora@netapp.com)

21 March 2023 NFStest 3.2