diff options
| author | Ian Lance Taylor <iant@golang.org> | 2026-01-30 19:18:14 -0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-02-06 15:39:54 -0800 |
| commit | fb45b084c82d7d863edff5e3ccf2f302056cd8e6 (patch) | |
| tree | c778ac3baa7acd8188c6b392ee20b8ffbf8197c6 /src/cmd | |
| parent | 02a59322e8d0276f52e687cf60ed32f39305941f (diff) | |
| download | go-fb45b084c82d7d863edff5e3ccf2f302056cd8e6.tar.xz | |
cmd/link: only run ELF tests on ELF systems
Running these tests on other systems is a pointless waste of time.
This runs cmd/link/internal/ld/elf_test.go in the same cases that
we run cmd/link/elf_test.go.
Change-Id: I318fb5c2de9e4cfdb976bc2389c72cede6661b47
Reviewed-on: https://go-review.googlesource.com/c/go/+/740782
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd')
| -rw-r--r-- | src/cmd/link/internal/ld/elf_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/link/internal/ld/elf_test.go b/src/cmd/link/internal/ld/elf_test.go index 0b3229e29c..a80ff4a7b3 100644 --- a/src/cmd/link/internal/ld/elf_test.go +++ b/src/cmd/link/internal/ld/elf_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build cgo +//go:build cgo && (dragonfly || freebsd || linux || netbsd || openbsd || solaris) package ld @@ -52,7 +52,7 @@ func main() { elfFile, err := elf.NewFile(fi) if err != nil { - t.Skip("The system may not support ELF, skipped.") + t.Fatal(err) } section := elfFile.Section(".dynsym") @@ -153,7 +153,7 @@ func main() { elfFile, err := elf.NewFile(fi) if err != nil { - t.Skip("The system may not support ELF, skipped.") + t.Fatal(err) } section := elfFile.Section(".shstrtab") @@ -316,7 +316,7 @@ func TestElfBindNow(t *testing.T) { elfFile, err := elf.NewFile(fi) if err != nil { - t.Skip("The system may not support ELF, skipped.") + t.Fatal(err) } defer elfFile.Close() @@ -487,7 +487,7 @@ func TestRelroSectionOverlapIssue67261(t *testing.T) { elfFile, err := elf.NewFile(fi) if err != nil { - t.Skip("The system may not support ELF, skipped.") + t.Fatal(err) } defer elfFile.Close() |
