about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorStepan Koltsov <nga@yandex-team.ru>2015-03-06 02:33:24 +0300
committerStepan Koltsov <nga@yandex-team.ru>2015-03-06 02:33:24 +0300
commitd3e7700de45d6f6cb6acd7f598f9e635fd4de6fb (patch)
tree2ce2d5a88b22bd19a33a52b8d092c03dc600641a /src/libstd
parent68740b405404a3f885e388c8d31722797d519c30 (diff)
downloadrust-d3e7700de45d6f6cb6acd7f598f9e635fd4de6fb.tar.gz
rust-d3e7700de45d6f6cb6acd7f598f9e635fd4de6fb.zip
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
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/net/tcp.rs8
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),
         }
     }