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

Fix the uds_datagram tests with the latest nightly stdlib #3952

Merged
merged 2 commits into from Jul 12, 2021

Conversation

asomers
Copy link
Contributor

@asomers asomers commented Jul 10, 2021

io::ErrorKind just replaced most uses of "Other" with "Uncategorized"
and prohibits users from matching on "Uncategorized". So match on the
errno instead.

rust-lang/rust#85746

Motivation

Fix tests on the latest nightly stdlib

Solution

Don't match io::Error::Errorkind to Other or Uncategorized.

io::ErrorKind just replaced most uses of "Other" with "Uncategorized"
and prohibits users from matching on "Uncategorized".  So match on the
errno instead.

rust-lang/rust#85746
@Darksonn Darksonn added A-tokio Area: The main tokio crate M-net Module: tokio/net labels Jul 11, 2021
@asomers asomers requested a review from Darksonn July 11, 2021 13:02
@asomers asomers force-pushed the uds_datagram_uncategorized branch from 191838b to fb7e888 Compare July 11, 2021 13:13
@asomers asomers force-pushed the uds_datagram_uncategorized branch from fb7e888 to 3830582 Compare July 11, 2021 14:54
@Darksonn
Copy link
Contributor

It's true on FreeBSD, but I didn't check anywhere else. We may end up needing to whitelist a couple of different errnos.

If our CI setup passes with the current list, then we can merge it as is. Of course, if you are aware of any missing errnos, then it'd be nice to add them immediately.

@asomers
Copy link
Contributor Author

asomers commented Jul 11, 2021

It's true on FreeBSD, but I didn't check anywhere else. We may end up needing to whitelist a couple of different errnos.

If our CI setup passes with the current list, then we can merge it as is. Of course, if you are aware of any missing errnos, then it'd be nice to add them immediately.

Your CI setup passes because it doesn't test on the latest nightly. I'm not aware of any missing errnos, because I haven't tested on any OS but FreeBSD. But eventually somebody will.

@Darksonn
Copy link
Contributor

Right, good point. Let's merge #3953 first.

@Darksonn Darksonn merged commit 3fd88da into tokio-rs:master Jul 12, 2021
@asomers asomers deleted the uds_datagram_uncategorized branch July 13, 2021 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-net Module: tokio/net
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants