diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2019-10-16 21:55:40 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-10-17 17:03:29 +0000 |
| commit | 728a876ae291a2229047f2d112e0dffc71950dee (patch) | |
| tree | a246ea7733736a2e6806143b98cc413bc8da5da2 /src/net/interface_test.go | |
| parent | 24494440e0d265b9c88ebf6d7b450bdc42e5ff0c (diff) | |
| download | go-728a876ae291a2229047f2d112e0dffc71950dee.tar.xz | |
net: skip some interface tests on Dragonfly for now
Skipping tests isn't great, but neither is a wall of red masking other
potential regressions.
Updates #34368
Change-Id: I5fdfa54846dd8d648001594c74f059af8af52247
Reviewed-on: https://go-review.googlesource.com/c/go/+/201482
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/net/interface_test.go')
| -rw-r--r-- | src/net/interface_test.go | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/net/interface_test.go b/src/net/interface_test.go index c34cd7432f..4163fa9d9a 100644 --- a/src/net/interface_test.go +++ b/src/net/interface_test.go @@ -8,6 +8,7 @@ package net import ( "fmt" + "internal/testenv" "reflect" "runtime" "testing" @@ -50,10 +51,20 @@ func ipv6LinkLocalUnicastAddr(ifi *Interface) string { return "" } -func TestInterfaces(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skipf("sysctl is not supported on iOS") +func condSkipInterfaceTest(t *testing.T) { + t.Helper() + switch runtime.GOOS { + case "darwin": + if runtime.GOARCH == "arm" || runtime.GOARCH == "arm64" { + t.Skipf("sysctl is not supported on iOS") + } + case "dragonfly": + testenv.SkipFlaky(t, 34368) } +} + +func TestInterfaces(t *testing.T) { + condSkipInterfaceTest(t) ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -85,9 +96,7 @@ func TestInterfaces(t *testing.T) { } func TestInterfaceAddrs(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skipf("sysctl is not supported on iOS") - } + condSkipInterfaceTest(t) ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -107,9 +116,7 @@ func TestInterfaceAddrs(t *testing.T) { } func TestInterfaceUnicastAddrs(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skipf("sysctl is not supported on iOS") - } + condSkipInterfaceTest(t) ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -137,9 +144,7 @@ func TestInterfaceUnicastAddrs(t *testing.T) { } func TestInterfaceMulticastAddrs(t *testing.T) { - if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { - t.Skipf("sysctl is not supported on iOS") - } + condSkipInterfaceTest(t) ift, err := Interfaces() if err != nil { t.Fatal(err) |
