]> Cypherpunks repositories - gostls13.git/commitdiff
net,os: disable more sysctl tests on iOS
authorElias Naur <mail@eliasnaur.com>
Sat, 7 Sep 2019 22:21:57 +0000 (00:21 +0200)
committerElias Naur <mail@eliasnaur.com>
Sat, 7 Sep 2019 22:40:14 +0000 (22:40 +0000)
Updates #34133

Change-Id: I27c75993176cf876f2d80f70982528258c509b68
Reviewed-on: https://go-review.googlesource.com/c/go/+/193845
Run-TryBot: Elias Naur <mail@eliasnaur.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
src/net/interface_test.go
src/os/os_test.go

index fb6032fbc069a9f921c8aa344ddf927d823de564..6cdfb6265fff837e69f0df5a62aa5e10a90052ac 100644 (file)
@@ -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)
index 6c88d7e8b8a790cd83843002879039e03f96e305..974374ec667b89dbdcc90025298b9d78464b3e70 100644 (file)
@@ -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)