dd: move tests of slow reader to test_dd.rs#4160
Merged
jfinkels merged 1 commit intouutils:mainfrom Nov 19, 2022
Merged
Conversation
sylvestre
reviewed
Nov 19, 2022
Collaborator
tertsdiepraam
left a comment
There was a problem hiding this comment.
This is great! dd has always felt too complicated and I'm excited to see it cleaned up once we can convert Input to an enum :)
6cb97a9 to
f59c653
Compare
sylvestre
reviewed
Nov 19, 2022
209d12c to
f06d42d
Compare
Move some tests that simulate a slow reader from `dd.rs` to `tests/by-util/test_dd.rs`, and employ a FIFO and `sleep()` to simulate the slow reader instead of a custom struct that implements `Read`. This change restricts the type of `Input`s the `Output::dd_out()` function can accept, facilitating a future change to make `Input` an enum.
f06d42d to
903ad16
Compare
Collaborator
Author
|
Sorry, one more update: I updated this branch to remove some test fixtures that are no longer needed. They were stored in |
tertsdiepraam
approved these changes
Nov 19, 2022
|
GNU testsuite comparison: |
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.
Move some tests that simulate a slow reader from
dd.rstotests/by-util/test_dd.rs, and employ a FIFO andsleep()to simulate the slow reader instead of a custom struct that implementsRead. This change restricts the type ofInputs theOutput::dd_out()function can accept, facilitating a future change to makeInputan enum.Inspired by #4134 (comment)