shred: implement and test feature --random-source#7948
Merged
sylvestre merged 1 commit intouutils:mainfrom May 25, 2025
Merged
Conversation
|
GNU testsuite comparison: |
Collaborator
Author
Closed
Contributor
|
About the gnu test, looks good to me! |
f82b364 to
5a8fad8
Compare
|
GNU testsuite comparison: |
Collaborator
Author
|
Thanks for the force-push! Now that all is green, can it be merged? |
Contributor
|
thanks and sorry for the latency! |
This was referenced May 30, 2025
This file contains hidden or 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
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.
Fixes issue #5711.
This PR introduces the
--random-sourcefeature, and implements it faithfully: Copy the data from the source into the file-to-be-shredded. Note that the "random" data is not modified in any way. This is good, because no deterministic transformation can ever increase the entropy in random data; and it also makes it much simpler to verify thatshreduses the specified source.Note that the second of the two new tests is broken because the functionality was always broken, but only now becomes more visible. See #7947.
Note that this PR is not yet sufficient to pass
shred-passes.log. A future PR will have to adjust the test in order to accept our implementation.Note a final distinction: The GNU implementation also takes the "shuffled" order of passes from the random source (making it truly deterministic when
--random-sourceis provided). However, since we don't case about determinism (only the ability to provide a different source of entropy), I don't think we should follow GNU behavior here. What do you think?