From Fedora Project Wiki

Revision as of 18:30, 12 August 2023 by Sumantrom (talk | contribs) (Created page with "{QA/Test_Case |description=The attr package provides utilities to administer the extended attributes on filesystem objects. Extended attributes store metadata that isn't captured by traditional file attributes. This test case ensures that the `attr` utilities can successfully manage extended attributes of filesystem objects. |setup= # Ensure you have a Fedora system. # Install the {{package|attr}} package: `sudo dnf install attr`. # Create a test directory: `mkdir ~/attr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

{QA/Test_Case |description=The attr package provides utilities to administer the extended attributes on filesystem objects. Extended attributes store metadata that isn't captured by traditional file attributes. This test case ensures that the attr utilities can successfully manage extended attributes of filesystem objects. |setup=

  1. Ensure you have a Fedora system.
  2. Install the Package-x-generic-16.pngattr package: sudo dnf install attr.
  3. Create a test directory: mkdir ~/attr_test.

|actions=

  1. Open a terminal.
  2. Navigate to the test directory: cd ~/attr_test.
  3. Create a sample file: echo "Test content" > sample.txt.
  4. Set an extended attribute on the sample file using the setfattr utility: setfattr -n user.comment -v "This is a test attribute" sample.txt.
  5. Query the extended attribute using the getfattr utility: getfattr -n user.comment sample.txt.
  6. Remove the extended attribute using the setfattr utility: setfattr -x user.comment sample.txt.
  7. Again, query the extended attribute using the getfattr utility: getfattr -n user.comment sample.txt.

|results=

  1. After setting the extended attribute, there should be no errors returned by the setfattr utility.
  2. The getfattr utility should successfully display the attribute value "This is a test attribute" after it has been set.
  3. After removing the extended attribute, there should be no errors returned by the setfattr utility.
  4. The subsequent getfattr command should not display the attribute value, and it should indicate that the attribute does not exist.

|optional=For additional testing depth:

  1. Test setting and querying multiple extended attributes on a single file.
  2. Test the attr utilities on different file types, such as directories, symbolic links, etc.
  3. Verify the behavior of copying files with extended attributes to see if attributes are retained.
  4. Test on different file systems to ensure compatibility.

}}