Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes to test_dsync/test_xattr.sh and test_dsync/test_xattr.py #593

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

ofaaland
Copy link
Collaborator

Fixes two issues:

  1. The command line generated in test_xattr.py to execute test_xattr.sh and run the test was wrong. Fix that.
  2. The output of "xattr -l" needs to be sorted for the xattr comparison to work consistently

Tested on lustre and xfs

Copy link
Collaborator

@carbonneau1 carbonneau1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer copy extended attributes by default, right?

@ofaaland
Copy link
Collaborator Author

Updated to change the commit messages to clarify this affects a test under test_dsync/

@ofaaland
Copy link
Collaborator Author

We no longer copy extended attributes by default, right?

Based on the manpage dsync.1 discussion of --xattr and the commit message for adding that option, 96a9fe7, we used to copy all xattrs, and now the default is to copy non-lustre xattrs.

This test doesn't actually check what dsync does if --xattr is not provided, so I'm not sure. I'll look.

@ofaaland
Copy link
Collaborator Author

Altered the test so it tests dsync without --xattr as well as with --xattr {none,all,non-lustre}

@ofaaland
Copy link
Collaborator Author

ofaaland commented Oct 25, 2024

We no longer copy extended attributes by default, right?

Based on the manpage dsync.1 discussion of --xattr and the commit message for adding that option, 96a9fe7, we used to copy all xattrs, and now the default is to copy non-lustre xattrs.

This test doesn't actually check what dsync does if --xattr is not provided, so I'm not sure. I'll look.

@carbonneau1 I checked, and dsync copies non-lustre xattrs by default. I modified the test to check that functionality. Please review the additional change, thanks.

The python file should run the shell script and provide the correct
arguments.

The string formatting to generate the necessary command line had a
mismatched number of "%s" symbols and arguments.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Testing dsync on lustre, I observed this leading to test failure:

1,3d0
< Attribute "sync_and_verify_test" has a 31
< Attribute "testing" has a 18
< Attribute "456" has a 14
4a2,4
> Attribute "456" has a 14
> Attribute "testing" has a 18
> Attribute "sync_and_verify_test" has a 31

These are the xattrs of a source file and a destination file, as
produced by "xattr -l <filename>".

The xattrs may be stored in a different order in a source file than they
are in a destination file, but if the set of xattrs and their values
are the same, the xattrs are "the same" for the purposes of file system
users.

Sort the output of "xattr -l <filename>" so that ordering differences do
not cause the test to fail.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Test dsync without any "--xattrs" option as well as with each of
the valid arguments for that option.

When dsync is run without "--xattr", non-lustre xattrs are synced.

Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
@ofaaland ofaaland merged commit 0a00d5a into hpc:main Oct 31, 2024
@ofaaland ofaaland deleted the b-faaland-test-3 branch October 31, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants