-
Notifications
You must be signed in to change notification settings - Fork 716
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
Add more HUP tests #944
Merged
Merged
Add more HUP tests #944
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
hawkw
approved these changes
May 16, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 pending ci
kleimkuhler
pushed a commit
to kleimkuhler/mio
that referenced
this pull request
Sep 30, 2019
carllerche
pushed a commit
that referenced
this pull request
Oct 9, 2019
### Summary This change adds UDS support for Unix systems. The networking primitives `src/net/uds`. These modules provide the structs for `UnixDatagram`s, `UnixListener`s, and `UnixStream`s. Each of the methods on these structs dispatch to the Unix system structs in `src/sys/unix/uds.rs`. Use of these new structs should feel fairly similar to the `Tcp[...]` equivalents. The tests added also reflect the similar behavior that would be expected. ### Details Since this change only adds UDS support, there should be no behavior changes anywhere else. For reviewing, I recommend starting from the networking primitives and seeing what methods they dispatch to. The tests added in `tests/uds.rs` should feel fairly similar to `tcp_stream.rs`--the main difference coming from supporting `PathBuf`s as the socket address to connect to. I originally pulled in some testing infrastructure added to `v0.6.x` in #944, but ultimately found the functionality to not be as helpful due to a lot of changes that have since taken place in `master`. I think #944 could still be helpful, but as a separate change that is more about improving testing functionality and not included in a change that introduces additional functionality.
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.
This adds more tests verifying the behavior around returning
HUP
events.This includes the start of a test helper (
TestPoll
) that will eventually be used in more tests. It is currently implemented directly in the test file to aid in merging back into master.