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 snapshot corruption #539

Merged
merged 4 commits into from
Jan 24, 2025
Merged

Test snapshot corruption #539

merged 4 commits into from
Jan 24, 2025

Conversation

jorisdral
Copy link
Collaborator

@jorisdral jorisdral commented Jan 22, 2025

A next step would be to apply the same explicit corruption method to the statemachine tests.

In parallel, we can add silent corruption to fs-sim, which currently only simulates noisy corruption. We could use this silent corruption simulation to eventually replace the explicit flipFileBit calls

This should allow us to manually corrupt a file, and then we can test whether we
can detect the file corruption, for example using checksums in snapshot files.
@jorisdral jorisdral force-pushed the jdral/corrupt-snapshot branch from b8aef62 to f74efac Compare January 24, 2025 12:02
@jorisdral jorisdral marked this pull request as ready for review January 24, 2025 12:02
@jorisdral
Copy link
Collaborator Author

Ready for review now!

Copy link
Collaborator

@wenkokke wenkokke left a comment

Choose a reason for hiding this comment

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

LGTM. Left a few questions.

test/Test/FS.hs Show resolved Hide resolved
test/Test/Util/FS.hs Outdated Show resolved Hide resolved
test/Test/Util/FS.hs Show resolved Hide resolved
test/Test/Util/FS.hs Outdated Show resolved Hide resolved
In snapshot corruption tests, we're going to pick a random file to corrupt, but
to pick a file we first have to list the directory contents.
* Replace `UniqueList` by `Set`
* Replace `Path` by the new `FsPathComponent`
@jorisdral jorisdral force-pushed the jdral/corrupt-snapshot branch from f74efac to 7e88c2f Compare January 24, 2025 14:21
@jorisdral jorisdral added this pull request to the merge queue Jan 24, 2025
Merged via the queue into main with commit ac32ec9 Jan 24, 2025
27 checks passed
@jorisdral jorisdral deleted the jdral/corrupt-snapshot branch January 24, 2025 17:30
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