diff options
author | Cherry Zhang <cherryyz@google.com> | 2020-10-07 18:29:51 -0400 |
---|---|---|
committer | Cherry Zhang <cherryyz@google.com> | 2020-10-09 01:09:06 +0000 |
commit | f8df205e74d5122c43f41923280451641e566ee2 (patch) | |
tree | f05d5e3678f0d41405a8377b6a7920a2dee5d202 /src/cmd/nm | |
parent | 23e9e0c7f09bb50a870cbd1a2543a33df49b37b6 (diff) | |
download | go-f8df205e74d5122c43f41923280451641e566ee2.tar.gz go-f8df205e74d5122c43f41923280451641e566ee2.zip |
all: enable more tests on macOS/ARM64
On macOS, we can do "go build", can exec, and have the source
tree available, so we can enable more tests.
Skip ones that don't work. Most of them are due to that it
requires external linking (for now) and some tests don't work
with external linking (e.g. runtime deadlock detection). For
them, helper functions CanInternalLink/MustInternalLink are
introduced. I still want to have internal linking implemented,
but it is still a good idea to identify which tests don't work
with external linking.
Updates #38485.
Change-Id: I6b14697573cf3f371daf54b9ddd792acf232f2f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/260719
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/nm')
-rw-r--r-- | src/cmd/nm/nm_cgo_test.go | 5 | ||||
-rw-r--r-- | src/cmd/nm/nm_test.go | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/nm/nm_cgo_test.go b/src/cmd/nm/nm_cgo_test.go index 9a257e0ed2..58f2c24908 100644 --- a/src/cmd/nm/nm_cgo_test.go +++ b/src/cmd/nm/nm_cgo_test.go @@ -15,6 +15,11 @@ func canInternalLink() bool { switch runtime.GOOS { case "aix": return false + case "darwin": + switch runtime.GOARCH { + case "arm64": + return false + } case "dragonfly": return false case "freebsd": diff --git a/src/cmd/nm/nm_test.go b/src/cmd/nm/nm_test.go index 413a4eb06f..382446e9fe 100644 --- a/src/cmd/nm/nm_test.go +++ b/src/cmd/nm/nm_test.go @@ -173,6 +173,9 @@ func testGoExec(t *testing.T, iscgo, isexternallinker bool) { if runtime.GOOS == "windows" { return true } + if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" { + return true // On darwin/arm64 everything is PIE + } return false } |