From 2711fababd21c471dc0c64b33972c74a7c4eee20 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 8 Sep 2019 00:21:57 +0200 Subject: [PATCH] net,os: disable more sysctl tests on iOS Updates #34133 Change-Id: I27c75993176cf876f2d80f70982528258c509b68 Reviewed-on: https://go-review.googlesource.com/c/go/+/193845 Run-TryBot: Elias Naur Reviewed-by: Emmanuel Odeke --- src/net/interface_test.go | 12 ++++++++++++ src/os/os_test.go | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/net/interface_test.go b/src/net/interface_test.go index fb6032fbc0..6cdfb6265f 100644 --- a/src/net/interface_test.go +++ b/src/net/interface_test.go @@ -51,6 +51,9 @@ func ipv6LinkLocalUnicastAddr(ifi *Interface) string { } func TestInterfaces(t *testing.T) { + if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { + t.Skipf("sysctl is not supported on iOS") + } ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -82,6 +85,9 @@ 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") + } ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -101,6 +107,9 @@ 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") + } ift, err := Interfaces() if err != nil { t.Fatal(err) @@ -128,6 +137,9 @@ 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") + } ift, err := Interfaces() if err != nil { t.Fatal(err) diff --git a/src/os/os_test.go b/src/os/os_test.go index 6c88d7e8b8..974374ec66 100644 --- a/src/os/os_test.go +++ b/src/os/os_test.go @@ -1521,6 +1521,9 @@ func testWindowsHostname(t *testing.T, hostname string) { } func TestHostname(t *testing.T) { + if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") { + t.Skipf("sysctl is not supported on iOS") + } hostname, err := Hostname() if err != nil { t.Fatal(err) -- 2.50.0