]> Cypherpunks repositories - gostls13.git/commitdiff
all: enable more tests on macOS/ARM64
authorCherry Zhang <cherryyz@google.com>
Thu, 17 Sep 2020 19:02:26 +0000 (15:02 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 6 Oct 2020 21:56:24 +0000 (21:56 +0000)
Updates #38485.

Change-Id: Iac96f5ffe88521fcb11eab306d0df6463bdce046
Reviewed-on: https://go-review.googlesource.com/c/go/+/256920
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testcarchive/carchive_test.go
src/cmd/doc/doc_test.go
src/cmd/go/internal/work/build_test.go
src/go/build/build_test.go
src/log/syslog/syslog_test.go
src/net/dial_test.go
src/net/platform_test.go
src/path/filepath/path_test.go
src/runtime/debug/panic_test.go
src/syscall/syscall_unix_test.go

index 2e223ea369f455cf4632c252f3590f795737370e..6ed25d8948fbd892bb9b3a5e42debd48faea084b 100644 (file)
@@ -603,7 +603,7 @@ func TestExtar(t *testing.T) {
        if runtime.Compiler == "gccgo" {
                t.Skip("skipping -extar test when using gccgo")
        }
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skip("shell scripts are not executable on iOS hosts")
        }
 
index 47602833d357099472709abe1a04466d5c866e90..39530e3c2d67dec54e8a274fc25e89ddcb8ad2a8 100644 (file)
@@ -36,7 +36,7 @@ func TestMain(m *testing.M) {
 }
 
 func maybeSkip(t *testing.T) {
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skip("iOS does not have a full file tree")
        }
 }
index afed0fba723ed34a8fcbadfb911f1638b655cc00..904aee0684cb78cbccd5f81737002dfbac27d8c0 100644 (file)
@@ -221,10 +221,8 @@ func pkgImportPath(pkgpath string) *load.Package {
 // See https://golang.org/issue/18878.
 func TestRespectSetgidDir(t *testing.T) {
        switch runtime.GOOS {
-       case "darwin", "ios":
-               if runtime.GOARCH == "arm64" {
-                       t.Skip("can't set SetGID bit with chmod on iOS")
-               }
+       case "ios":
+               t.Skip("can't set SetGID bit with chmod on iOS")
        case "windows", "plan9":
                t.Skip("chown/chmod setgid are not supported on Windows or Plan 9")
        }
index 22c62ce87db029e02863b2f27348560a61f80235..2f2e80b5a8c1b5e17f3f597e55d19914b3fff986 100644 (file)
@@ -120,7 +120,7 @@ func TestMultiplePackageImport(t *testing.T) {
 }
 
 func TestLocalDirectory(t *testing.T) {
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skipf("skipping on %s/%s, no valid GOROOT", runtime.GOOS, runtime.GOARCH)
        }
 
@@ -250,7 +250,7 @@ func TestMatchFile(t *testing.T) {
 }
 
 func TestImportCmd(t *testing.T) {
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skipf("skipping on %s/%s, no valid GOROOT", runtime.GOOS, runtime.GOARCH)
        }
 
index dd2f83e04f4c4eddb28c4e2cd5872e7b167dab91..30abfae550f6e69c012d2fa4ae1e06282512e38a 100644 (file)
@@ -51,12 +51,7 @@ func testableNetwork(network string) bool {
        switch network {
        case "unix", "unixgram":
                switch runtime.GOOS {
-               case "darwin", "ios":
-                       switch runtime.GOARCH {
-                       case "arm64":
-                               return false
-                       }
-               case "android":
+               case "ios", "android":
                        return false
                }
        }
index 2706de44429277f86f30aa47f43e881cd90221f9..57cf5554ad2c69e980ec3f46b8614de16e8e3e68 100644 (file)
@@ -990,7 +990,7 @@ func TestDialerControl(t *testing.T) {
 // except that it won't skip testing on non-mobile builders.
 func mustHaveExternalNetwork(t *testing.T) {
        t.Helper()
-       mobile := runtime.GOOS == "android" || (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64"
+       mobile := runtime.GOOS == "android" || runtime.GOOS == "ios"
        if testenv.Builder() == "" || mobile {
                testenv.MustHaveExternalNetwork(t)
        }
index 4b92bb6df00e20f87466cd4ac1bc7d1b8f696808..2da23dedcea6749a74997c3804e376dc7b9b3801 100644 (file)
@@ -82,7 +82,7 @@ func testableNetwork(network string) bool {
 }
 
 func iOS() bool {
-       return (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64"
+       return runtime.GOOS == "ios"
 }
 
 // testableAddress reports whether address of network is testable on
index ca100ff071c0472b22caa762a1fa56299baee103..6a8700e4135a75e900d7629476cdfe5282dc39d1 100644 (file)
@@ -431,7 +431,7 @@ func chtmpdir(t *testing.T) (restore func()) {
 }
 
 func TestWalk(t *testing.T) {
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                restore := chtmpdir(t)
                defer restore()
        }
@@ -1278,7 +1278,7 @@ func TestDriveLetterInEvalSymlinks(t *testing.T) {
 }
 
 func TestBug3486(t *testing.T) { // https://golang.org/issue/3486
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skipf("skipping on %s/%s", runtime.GOOS, runtime.GOARCH)
        }
        root, err := filepath.EvalSymlinks(runtime.GOROOT() + "/test")
index 93be216985f48d5ebe572787d102baac3e8fe127..b67a3de4f98ef22d75f6db93b8dbbd9a6b1a3406 100644 (file)
@@ -20,8 +20,8 @@ func TestPanicOnFault(t *testing.T) {
        if runtime.GOARCH == "s390x" {
                t.Skip("s390x fault addresses are missing the low order bits")
        }
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
-               t.Skip("darwin/arm64 doesn't provide fault addresses")
+       if runtime.GOOS == "ios" {
+               t.Skip("iOS doesn't provide fault addresses")
        }
        m, err := syscall.Mmap(-1, 0, 0x1000, syscall.PROT_READ /* Note: no PROT_WRITE */, syscall.MAP_SHARED|syscall.MAP_ANON)
        if err != nil {
index 7e9bb0c3ac3b50812087a370086a3390fae15adc..d754c075f10b4bc9ac7e3f7cf125ecc6de724c73 100644 (file)
@@ -70,7 +70,7 @@ func _() {
 // Thus this test also verifies that the Flock_t structure can be
 // roundtripped with F_SETLK and F_GETLK.
 func TestFcntlFlock(t *testing.T) {
-       if (runtime.GOOS == "darwin" || runtime.GOOS == "ios") && runtime.GOARCH == "arm64" {
+       if runtime.GOOS == "ios" {
                t.Skip("skipping; no child processes allowed on iOS")
        }
        flock := syscall.Flock_t{