std: net: enable bind_error test on all platforms
Bind on non-local IP address is essentially the same test, and it works same way on all platforms. Fixes #11530
This commit is contained in:
parent
68740b4054
commit
d3e7700de4
1 changed files with 4 additions and 4 deletions
|
@ -233,13 +233,13 @@ mod tests {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME #11530 this fails on android because tests are run as root
|
|
||||||
#[cfg_attr(any(windows, target_os = "android"), ignore)]
|
|
||||||
#[test]
|
#[test]
|
||||||
fn bind_error() {
|
fn bind_error() {
|
||||||
match TcpListener::bind("0.0.0.0:1") {
|
match TcpListener::bind("1.1.1.1:9999") {
|
||||||
Ok(..) => panic!(),
|
Ok(..) => panic!(),
|
||||||
Err(e) => assert_eq!(e.kind(), ErrorKind::PermissionDenied),
|
Err(e) =>
|
||||||
|
// EADDRNOTAVAIL is mapped to ConnectionRefused
|
||||||
|
assert_eq!(e.kind(), ErrorKind::ConnectionRefused),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue