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

Draft: test_walkfail.sh: implement src walk fail test #598

Closed
wants to merge 13 commits into from

Conversation

ofaaland
Copy link
Collaborator

@ofaaland ofaaland commented Nov 11, 2024

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.

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.
@ofaaland
Copy link
Collaborator Author

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.
@ofaaland ofaaland closed this Nov 13, 2024
@ofaaland ofaaland deleted the b-src-walk-noaccess branch November 13, 2024 20:09
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.

1 participant