nixpkgs/pkgs/development/compilers/rust/patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch

54 lines
1.6 KiB
Diff
Raw Normal View History

From 26d3b70abec1adf773522643b31ce9c03439916a Mon Sep 17 00:00:00 2001
From: Joerg Thalheim <joerg@thalheim.io>
Date: Tue, 10 Oct 2017 00:40:20 +0100
Subject: [PATCH] Disable fragile tests libstd::net::tcp on Darwin/Linux
Signed-off-by: Joerg Thalheim <joerg@thalheim.io>
---
src/libstd/net/tcp.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs
index 8d1e7882e5..2c223fb315 100644
--- a/src/libstd/net/tcp.rs
+++ b/src/libstd/net/tcp.rs
@@ -949,6 +949,7 @@ mod tests {
})
}
+ #[cfg_attr(target_os = "macos", ignore)]
#[test]
fn write_close() {
each_ip(&mut |addr| {
@@ -1421,7 +1422,10 @@ mod tests {
// FIXME: re-enabled bitrig/openbsd tests once their socket timeout code
// no longer has rounding errors.
- #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
+ #[cfg_attr(any(target_os = "bitrig",
+ target_os = "netbsd",
+ target_os = "openbsd",
+ target_os = "macos"), ignore)]
#[test]
fn timeouts() {
let addr = next_test_ip4();
@@ -1500,6 +1504,7 @@ mod tests {
assert_eq!(false, t!(stream.nodelay()));
}
+ #[cfg_attr(target_os = "macos", ignore)]
#[test]
fn ttl() {
let ttl = 100;
@@ -1568,6 +1573,7 @@ mod tests {
})
}
+ #[cfg_attr(target_os = "linux", ignore)]
#[test]
fn connect_timeout_unroutable() {
// this IP is unroutable, so connections should always time out,
--
2.14.2