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

test_multiple_syncs.sh: verify sequential syncs change nothing #620

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

ofaaland
Copy link
Collaborator

@ofaaland ofaaland commented Jan 7, 2025

Test multiple dsyncs, and test dsync against rsync.

  1. Running dsync twice, the second time no changes should be reported.
  2. Running rsync followed by dsync, the dsync should report no changes.
  3. Running dsync followed by rsync, the rsync should report no changes.

rsync is run with -av -HAX to copy hard links, ACLs, and xattrs.

However, the test data copied is created with dfilemaker, which does not create ACLs or xattrs, and may not create files with multiple hard links. This should be improved.

@ofaaland ofaaland requested a review from carbonneau1 January 7, 2025 04:46
@ofaaland ofaaland self-assigned this Jan 7, 2025
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.

For shell script is there way to enforce 80 characters width?
looks good.

@ofaaland
Copy link
Collaborator Author

ofaaland commented Jan 7, 2025

@carbonneau1 I modified the test so the lines are all <= 80 chars wide except for a couple that are 83 chars wide.

I also found there was a bug in the rsync grep checking for unexpected files and fixed that.

@ofaaland
Copy link
Collaborator Author

Hi @carbonneau1 please review this updated version of the PR, thanks

rm -fr $DSYNC_SRC/stuff
rm -fr $DSYNC_DEST/stuff
mkdir $DSYNC_SRC/stuff
${MFU_TEST_BIN}/dfilemaker -d 5-10 -n 100-300 -s 1MB-10MB $DSYNC_SRC/stuff
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see you generate the test data set with dfilemaker but you cal the same line from 183 and 191?
You delete the data test set once completed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, no need to generate source data over and over again. Fixed to only generate source data once.

Test multiple dsyncs, and test dsync against rsync.

1. Running dsync twice, the second time no changes should be reported.
2. Running rsync followed by dsync, the dsync should report no changes.
3. Running dsync followed by rsync, the rsync should report no changes.

rsync is run with -av -HAX to copy hard links, ACLs, and xattrs.

However, the test data copied is created with dfilemaker, which does not
create ACLs or xattrs, or named pipes, and may not create files with
multiple hard links.  This should be improved.

Signed-off-by: Olaf Faaland <[email protected]>
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.

Looks really good.

@ofaaland ofaaland merged commit f69dae3 into hpc:main Jan 22, 2025
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.

2 participants