From fe3ba74b9e6e3385cbf7c2f3a9c0b72baeac4b01 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Sat, 27 Sep 2025 19:45:36 +0100 Subject: [PATCH] cmd/link: skip TestFlagW on platforms without DWARF symbol table As with other DWARF tests, don't run TestFlagW on platforms where executables don't have a DWARF symbol table. Fixes #75585 Change-Id: I81014bf59b15e30ac1b2a7d24a52f9647db46c26 Reviewed-on: https://go-review.googlesource.com/c/go/+/706418 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Carlos Amedee --- src/cmd/link/dwarf_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/link/dwarf_test.go b/src/cmd/link/dwarf_test.go index 6a60a746a5..4fce358e60 100644 --- a/src/cmd/link/dwarf_test.go +++ b/src/cmd/link/dwarf_test.go @@ -364,6 +364,10 @@ func TestFlagW(t *testing.T) { if runtime.GOOS == "aix" { t.Skip("internal/xcoff cannot parse file without symbol table") } + if !platform.ExecutableHasDWARF(runtime.GOOS, runtime.GOARCH) { + t.Skipf("skipping on %s/%s: no DWARF symbol table in executables", runtime.GOOS, runtime.GOARCH) + } + t.Parallel() tmpdir := t.TempDir() -- 2.52.0