Commit e11c15a21a for golang
commit e11c15a21a41205e27322a412ae85d62835d24f1
Author: Changkun Ou <hi@changkun.de>
Date: Sun Nov 29 15:56:51 2026 +0100
cmd/internal/testdir: skip on Android and iOS
Before CL 853365, cmd/dist registered these tests itself and did not
do so on Android and iOS. Since then they run there as part of
"go test cmd". On android/arm64 more than a thousand of them fail,
because the test links its programs with "go tool link" in the default
build mode, and the port needs -buildmode=pie:
runtime.gcdata: missing Go type information for global symbol .dynsym: size 24
Skip the tests on Android and iOS again.
For #83464
Change-Id: I68bd27a29ee4ebdd4997cab0eef941e0d1b16f4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/868242
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
diff --git a/src/cmd/internal/testdir/testdir_test.go b/src/cmd/internal/testdir/testdir_test.go
index 0015c0d3ee..67a4799268 100644
--- a/src/cmd/internal/testdir/testdir_test.go
+++ b/src/cmd/internal/testdir/testdir_test.go
@@ -84,6 +84,13 @@ var (
// Each .go file test case in GOROOT/test is registered as a subtest with
// a full name like "Test/fixedbugs/bug000.go" ('/'-separated relative path).
func Test(t *testing.T) {
+ if runtime.GOOS == "android" || runtime.GOOS == "ios" {
+ // cmd/dist did not run these tests on Android and iOS when it
+ // registered them itself. On android/arm64 the programs do not
+ // even link: the tests run the linker in its default build mode,
+ // and the port needs -buildmode=pie.
+ t.Skipf("skipping on %s", runtime.GOOS)
+ }
if testing.Short() && strings.Contains(testenv.Builder(), "plan9") && *target == "" {
t.Skipf("skipping test in -short mode on plan9 builder without -target flag; see go.dev/issue/83245")
}