| NFSTEST_XATTR(1) | nfstest_xattr 1.1 | NFSTEST_XATTR(1) |
nfstest_xattr - Extended Attributes tests
nfstest_xattr --server <server> [options]
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.
Verify getting extended attribute
Verify getting extended attribute fails when attribute does not exist
Verify getting extended attribute when delegation is granted on second client
Verify getting extended attribute fails when attribute does not exist when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist
Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist
Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist
Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists
Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists
Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists
Verify setting extended attribute with SETXATTR4_EITHER when attribute does not exist when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_CREATE when attribute does not exist when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_REPLACE fails when attribute does not exist when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_EITHER when attribute already exists when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_CREATE fails when attribute already exists when delegation is granted on second client
Verify setting extended attribute with SETXATTR4_REPLACE when attribute already exists when delegation is granted on second client
Verify removing extended attribute
Verify removing extended attribute fails when attribute does not exist
Verify removing extended attribute when delegation is granted on second client
Verify removing extended attribute fails when attribute does not exist when delegation is granted on second client
Verify listing extended attributes with no user namespace attributes
Verify listing extended attribute
Verify listing extended attribute (many attributes)
Verify listing extended attributes with no user namespace attributes when delegation is granted on second client
Verify listing extended attribute when delegation is granted on second client
Verify listing extended attribute (many attributes) when delegation is granted on second client
Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist
Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists
Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist
Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists
Verify SETXATTR change info with SETXATTR4_EITHER when attribute does not exist when file is modified on second client
Verify SETXATTR change info with SETXATTR4_EITHER when attribute already exists when file is modified on second client
Verify SETXATTR change info with SETXATTR4_CREATE when attribute does not exist when file is modified on second client
Verify SETXATTR change info with SETXATTR4_REPLACE when attribute already exists when file is modified on second client
Run all GETXATTR tests: ngetxattr01, ngetxattr02, dgetxattr01, dgetxattr02
Run all GETXATTR tests when no open on second client: ngetxattr01, ngetxattr02
Run all GETXATTR tests when delegation is granted on second client: dgetxattr01, dgetxattr02
Run all SETXATTR tests: nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06, dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06
Run all SETXATTR tests when no open on second client: nsetxattr01, nsetxattr02, nsetxattr03, nsetxattr04, nsetxattr05, nsetxattr06
Run all SETXATTR tests when delegation is granted on second client: dsetxattr01, dsetxattr02, dsetxattr03, dsetxattr04, dsetxattr05, dsetxattr06
Run all REMOVEXATTR tests: nremovexattr01, nremovexattr02, dremovexattr01, dremovexattr02
Run all REMOVEXATTR tests when no open on second client: nremovexattr01, nremovexattr02
Run all REMOVEXATTR tests when delegation is granted on second client: dremovexattr01, dremovexattr02
Run all LISTXATTRS tests: nlistxattr01, nlistxattr02, nlistxattr03, dlistxattr01, dlistxattr02, dlistxattr03
Run all LISTXATTRS tests when no open on second client: nlistxattr01, nlistxattr02, nlistxattr03
Run all LISTXATTRS tests when delegation is granted on second client: dlistxattr01, dlistxattr02, dlistxattr03
Run all CINFO tests: ncinfo01, ncinfo02, ncinfo03, ncinfo04, mcinfo01, mcinfo02, mcinfo03, mcinfo04
Run all CINFO tests when no open on second client: ncinfo01, ncinfo02, ncinfo03, ncinfo04
Run all CINFO tests when file is modified on second client: mcinfo01, mcinfo02, mcinfo03, mcinfo04
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
The only required option is --server
$ nfstest_xattr --server 192.168.0.11
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.
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)
No known bugs.
Jorge Mora (mora@netapp.com)
| 21 March 2023 | NFStest 3.2 |