-
Notifications
You must be signed in to change notification settings - Fork 66
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
Draft: test_walkfail.sh: implement src walk fail test #598
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a small set of bash functions for performing set operations, for use with dsync tests. Add a small test driver and two data files for testing the bash functions. Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Add the following tests: test_expectfail.sh: add tests for missing source or destination parent test_existence.sh: verify set of files synced is correct Add stubs for the following tests: test_metadata.sh: verify metadata of synced files is correct test_data.sh: verify data in synced files is correct Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Implement a test where dsync --delete is run, and the walk of the source tree is caused to fail by making a directory unreadable. dsync currently has a bug which causes it to fail that test, hpc#587 After the source walk fails, dsync continues with the dest walk followed by the copies that the deletes. Because the source walk failed, the list of files and directories on the source is incomplete. Files or directories that are already on both source and destination, but which were not walked on the source, are missing from the source list. Those files or directories are then deleted from the destination tree.
After #596 is merged, I'll rebase this, and there will only be one commit - "test_walkfail.sh: implement src walk fail test" |
If there is an error during the walk of the source tree, the source flist generated is likely incomplete. In the case where the source and destination have the same files and directories before dsync --delete is run, an incomplete source flist results in files being incorrectly deleted from the destination. When an error is detected on the source walk, warn the user and disable the delete option. See rsync(1) for the --delete option, it takes the same approach.
In places where we disregard the return value of mfu_flist_walk_param_paths(), add (void) as a visual indicator. In these cases we still need to analyze what we would do differently, if anything, with the knowledge that the walk failed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft only - do not merge
Implement a test where dsync --delete is run, and the walk of the
source tree is caused to fail by making a directory unreadable.
This test is currently expected to fail.
dsync currently has a bug described in
#587
After the source walk fails, dsync continues with the dest walk
followed by the copies that the deletes.
Because the source walk failed, the list of files and directories
on the source is incomplete. Files or directories that are already
on both source and destination, but which were not walked on the
source, are missing from the source list. Those files or directories
are then deleted from the destination tree.