aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2022-11-04 14:58:40 -0400
committerGopher Robot <gobot@golang.org>2022-11-16 16:42:18 +0000
commit0266671e3d829c216e10e1a5ad6b4647ea5e39c4 (patch)
treedb326ec8550cb29019173719a6d53c7a995dba57 /src/cmd/dist/test.go
parent38218f398758f336c4848783b27a02847c317afc (diff)
downloadgo-0266671e3d829c216e10e1a5ad6b4647ea5e39c4.tar.gz
go-0266671e3d829c216e10e1a5ad6b4647ea5e39c4.zip
cmd/dist: add curiously missing GOOS/GOARCH combinations
The cmd/dist cgo_test enumerates a large number of platforms in various special cases. Some combinations are suspiciously absent. This CL completes the combinations. I've confirmed using trybots that the newly-enabled tests pass on android/* (this is not surprising because the gohostos is never "android" anyway), windows/arm64, linux/ppc64 (no cgo), linux/loong64 (except for one test, filed #56623), linux/mips*, netbsd/arm (except for one test, filed #56629), and netbsd/arm64. The windows/arm builder is out to lunch, so I'm assuming that works. Since netbsd/arm and arm64 mostly passed these tests, I've also enabled them on netbsd/386 and netbsd/amd64, where they seem to work fine as well. Preparation for #37486. Change-Id: I04c3348e4f422d74d51e714647ca3db379e6e919 Reviewed-on: https://go-review.googlesource.com/c/go/+/448016 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/dist/test.go')
-rw-r--r--src/cmd/dist/test.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 9670ef447f..46ab0c7bcb 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1183,7 +1183,7 @@ func (t *tester) cgoTest(dt *distTest) error {
pair := gohostos + "-" + goarch
switch pair {
case "darwin-amd64", "darwin-arm64",
- "windows-386", "windows-amd64":
+ "windows-386", "windows-amd64", "windows-arm", "windows-arm64":
// test linkmode=external, but __thread not supported, so skip testtls.
if !t.extLink() {
break
@@ -1201,11 +1201,11 @@ func (t *tester) cgoTest(dt *distTest) error {
}
case "aix-ppc64",
- "android-arm", "android-arm64",
+ "android-386", "android-amd64", "android-arm", "android-arm64",
"dragonfly-amd64",
"freebsd-386", "freebsd-amd64", "freebsd-arm", "freebsd-riscv64",
- "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-riscv64", "linux-s390x",
- "netbsd-386", "netbsd-amd64",
+ "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-loong64", "linux-mips", "linux-mipsle", "linux-mips64", "linux-mips64le", "linux-ppc64", "linux-ppc64le", "linux-riscv64", "linux-s390x",
+ "netbsd-386", "netbsd-amd64", "netbsd-arm", "netbsd-arm64",
"openbsd-386", "openbsd-amd64", "openbsd-arm", "openbsd-arm64", "openbsd-mips64":
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-ldflags=-linkmode=external", ".")
@@ -1217,7 +1217,7 @@ func (t *tester) cgoTest(dt *distTest) error {
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", "-linkmode=external", ".")
switch pair {
- case "aix-ppc64", "netbsd-386", "netbsd-amd64":
+ case "aix-ppc64":
// no static linking
case "freebsd-arm":
// -fPIC compiled tls code will use __tls_get_addr instead
@@ -1232,7 +1232,8 @@ func (t *tester) cgoTest(dt *distTest) error {
if err := cmd.Run(); err != nil {
fmt.Println("No support for static linking found (lacks libc.a?), skip cgo static linking test.")
} else {
- if goos != "android" {
+ if goos != "android" && pair != "netbsd-arm" {
+ // TODO(#56629): Why does this fail on netbsd-arm?
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-ldflags", `-linkmode=external -extldflags "-static -pthread"`, ".")
}
t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), ".")
@@ -1243,8 +1244,11 @@ func (t *tester) cgoTest(dt *distTest) error {
// -static in CGO_LDFLAGS triggers a different code path
// than -static in -extldflags, so test both.
// See issue #16651.
- cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
- setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
+ if goarch != "loong64" {
+ // TODO(#56623): Why does this fail on loong64?
+ cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=static", ".")
+ setEnv(cmd, "CGO_LDFLAGS", "-static -pthread")
+ }
}
}