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

Add more HUP tests #944

Merged
merged 14 commits into from
Jun 7, 2019
Merged

Add more HUP tests #944

merged 14 commits into from
Jun 7, 2019

Conversation

carllerche
Copy link
Member

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.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

👍 pending ci

@carllerche carllerche merged commit f1b580c into v0.6.x Jun 7, 2019
@Thomasdezeeuw Thomasdezeeuw deleted the wtf-shutdown branch June 8, 2019 09:14
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants