Ian Lance Taylor would like Cherry Mui to review this change.
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.
diff --git a/src/cmd/link/internal/ld/elf_test.go b/src/cmd/link/internal/ld/elf_test.go
index 0b3229e..65fea5b 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)
package ld
@@ -52,7 +52,7 @@
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 @@
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 @@
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 @@
elfFile, err := elf.NewFile(fi)
if err != nil {
- t.Skip("The system may not support ELF, skipped.")
+ t.Fatal(err)
}
defer elfFile.Close()
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
//go:build cgo && (dragonfly || freebsd || linux || netbsd || openbsd)solaris is also ELF, right?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
//go:build cgo && (dragonfly || freebsd || linux || netbsd || openbsd)solaris is also ELF, right?
True. I just copied the build constraint from cmd/link/elf_test.go. Added Solaris. Followup CL will Solaris to the other file.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/cmd/link/internal/ld/elf_test.go
Insertions: 1, Deletions: 1.
@@ -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 && (dragonfly || freebsd || linux || netbsd || openbsd)
+//go:build cgo && (dragonfly || freebsd || linux || netbsd || openbsd || solaris)
package ld
```
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.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |