From d12fe60004ae5e4024c8a93f4f7de7183bb61576 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Wed, 1 Mar 2023 13:45:18 +0000 Subject: all: skip tests that fail on android/arm64 Many of the tests skipped platforms that build PIE binaries by default, but (still) lack a central function to report which platforms those are. Some of the tests assumed (but did not check for) internal linking support, or invoked `go tool link` directly without properly configuring the external linker. A few of the tests seem to be triggering latent bugs in the linker. For #58806. For #58807. For #58794. Change-Id: Ie4d06b1597f404590ad2abf978d4c363647407ac Reviewed-on: https://go-review.googlesource.com/c/go/+/472455 Reviewed-by: Cherry Mui Auto-Submit: Bryan Mills Run-TryBot: Bryan Mills TryBot-Result: Gopher Robot --- src/cmd/nm/nm_test.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/cmd/nm/nm_test.go') diff --git a/src/cmd/nm/nm_test.go b/src/cmd/nm/nm_test.go index 7d8358e294..014a5d2bd7 100644 --- a/src/cmd/nm/nm_test.go +++ b/src/cmd/nm/nm_test.go @@ -165,6 +165,14 @@ func testGoExec(t *testing.T, iscgo, isexternallinker bool) { return true } } + // Code is always relocated if the default buildmode is PIE. + // + // TODO(#58807): factor this condition out into a function in + // internal/platform so that it won't get out of sync with cmd/go and + // cmd/link. + if runtime.GOOS == "android" { + return true + } if runtime.GOOS == "windows" { return true } @@ -198,7 +206,12 @@ func testGoExec(t *testing.T, iscgo, isexternallinker bool) { stype = "D" } if want, have := stype, strings.ToUpper(f[1]); have != want { - t.Errorf("want %s type for %s symbol, but have %s", want, name, have) + if runtime.GOOS == "android" && name == "runtime.epclntab" && have == "D" { + // TODO(#58807): Figure out why this fails and fix up the test. + t.Logf("(ignoring on %s) want %s type for %s symbol, but have %s", runtime.GOOS, want, name, have) + } else { + t.Errorf("want %s type for %s symbol, but have %s", want, name, have) + } } delete(runtimeSyms, name) } -- cgit v1.3