}
c, err := d.Dial(tt.network, addr)
if err == nil && tt.error != nil || err != nil && tt.error == nil {
- // On Darwin this occasionally times out.
- // We don't know why. Issue #22019.
- if runtime.GOOS == "darwin" && tt.error == nil && os.IsTimeout(err) {
+ // A suspected kernel bug in macOS 10.12 occasionally results in
+ // timeout errors when dialing address ::1. The errors have not
+ // been observed on newer versions of the OS, so we don't plan to work
+ // around them. See https://golang.org/issue/22019.
+ if tt.raddr == "::1" && os.Getenv("GO_BUILDER_NAME") == "darwin-amd64-10_12" && os.IsTimeout(err) {
t.Logf("ignoring timeout error on Darwin; see https://golang.org/issue/22019")
} else {
t.Errorf("%s %v->%s: got %v; want %v", tt.network, tt.laddr, tt.raddr, err, tt.error)
if perr := parseDialError(err); perr != nil {
t.Error(perr)
}
+ if tt.taddr == "::1" && os.Getenv("GO_BUILDER_NAME") == "darwin-amd64-10_12" && os.IsTimeout(err) {
+ // A suspected kernel bug in macOS 10.12 occasionally results in
+ // "i/o timeout" errors when dialing address ::1. The errors have not
+ // been observed on newer versions of the OS, so we don't plan to work
+ // around them. See https://golang.org/issue/32919.
+ t.Logf("ignoring error on known-flaky macOS 10.12 builder: %v", err)
+ continue
+ }
t.Fatal(err)
}
defer c.Close()
}
func TestNetpollDeadlock(t *testing.T) {
+ if os.Getenv("GO_BUILDER_NAME") == "darwin-amd64-10_12" {
+ // A suspected kernel bug in macOS 10.12 occasionally results in
+ // an apparent deadlock when dialing localhost. The errors have not
+ // been observed on newer versions of the OS, so we don't plan to work
+ // around them. See https://golang.org/issue/22019.
+ testenv.SkipFlaky(t, 22019)
+ }
+
t.Parallel()
output := runTestProg(t, "testprognet", "NetpollDeadlock")
want := "done\n"