diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-06 09:02:27 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-06 09:02:27 +0530 |
| commit | 4993fd0fdc26b02ec1516b40e67d32650fec0a03 (patch) | |
| tree | 4e8e140448a8663a0ec1248fb8f4a590d766cba8 /src/libstd | |
| parent | 0b7117b7a350e207c58f12dd48267af721c8b4b6 (diff) | |
| parent | d3e7700de45d6f6cb6acd7f598f9e635fd4de6fb (diff) | |
| download | rust-4993fd0fdc26b02ec1516b40e67d32650fec0a03.tar.gz rust-4993fd0fdc26b02ec1516b40e67d32650fec0a03.zip | |
Rollup merge of #23095 - stepancheg:test-bind-fail, r=alexcrichton
Bind on non-local IP address is essentially the same test, and it works same way on all platforms. Fixes #11530
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/net/tcp.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 6ce3a939c6a..fd723ea13e9 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -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] fn bind_error() { - match TcpListener::bind("0.0.0.0:1") { + match TcpListener::bind("1.1.1.1:9999") { Ok(..) => panic!(), - Err(e) => assert_eq!(e.kind(), ErrorKind::PermissionDenied), + Err(e) => + // EADDRNOTAVAIL is mapped to ConnectionRefused + assert_eq!(e.kind(), ErrorKind::ConnectionRefused), } } |
