]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: skip TestFlagW on platforms without DWARF symbol table
authorRichard Miller <millerresearch@gmail.com>
Sat, 27 Sep 2025 18:45:36 +0000 (19:45 +0100)
committerCherry Mui <cherryyz@google.com>
Mon, 29 Sep 2025 14:59:10 +0000 (07:59 -0700)
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 <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/cmd/link/dwarf_test.go

index 6a60a746a5b48bc4c103593b4d2ccd3f48bbc4e7..4fce358e602de5d85bb9194fbdb223aa481482f1 100644 (file)
@@ -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()