Skip to content

Fix the uds_datagram tests with the latest nightly stdlib#3952

Merged
Darksonn merged 2 commits into
tokio-rs:masterfrom
asomers:uds_datagram_uncategorized
Jul 12, 2021
Merged

Fix the uds_datagram tests with the latest nightly stdlib#3952
Darksonn merged 2 commits into
tokio-rs:masterfrom
asomers:uds_datagram_uncategorized

Conversation

@asomers

@asomers asomers commented Jul 10, 2021

Copy link
Copy Markdown
Contributor

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
Comment thread tokio/tests/uds_datagram.rs Outdated
@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
Copy Markdown
Member

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

asomers commented Jul 11, 2021

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

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.

2 participants