aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/link')
-rw-r--r--src/cmd/link/internal/ld/dwarf_test.go15
-rw-r--r--src/cmd/link/internal/ld/elf_test.go3
-rw-r--r--src/cmd/link/internal/ld/ld_test.go5
-rw-r--r--src/cmd/link/internal/ld/macho_test.go2
-rw-r--r--src/cmd/link/link_test.go16
5 files changed, 31 insertions, 10 deletions
diff --git a/src/cmd/link/internal/ld/dwarf_test.go b/src/cmd/link/internal/ld/dwarf_test.go
index 28b5ddf74c..ab086c57f4 100644
--- a/src/cmd/link/internal/ld/dwarf_test.go
+++ b/src/cmd/link/internal/ld/dwarf_test.go
@@ -287,7 +287,10 @@ func TestSizes(t *testing.T) {
mustHaveDWARF(t)
// External linking may bring in C symbols with unknown size. Skip.
- testenv.MustInternalLink(t, false)
+ //
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
t.Parallel()
@@ -861,7 +864,9 @@ func TestAbstractOriginSanityIssue26237(t *testing.T) {
func TestRuntimeTypeAttrInternal(t *testing.T) {
testenv.MustHaveGoBuild(t)
- testenv.MustInternalLink(t, false)
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
mustHaveDWARF(t)
@@ -1491,7 +1496,11 @@ func TestIssue39757(t *testing.T) {
func TestIssue42484(t *testing.T) {
testenv.MustHaveGoBuild(t)
- testenv.MustInternalLink(t, false) // Avoid spurious failures from external linkers.
+ // Avoid spurious failures from external linkers.
+ //
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
mustHaveDWARF(t)
diff --git a/src/cmd/link/internal/ld/elf_test.go b/src/cmd/link/internal/ld/elf_test.go
index c42a1173b6..c2a1bc0b94 100644
--- a/src/cmd/link/internal/ld/elf_test.go
+++ b/src/cmd/link/internal/ld/elf_test.go
@@ -278,7 +278,8 @@ func TestElfBindNow(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if test.mustInternalLink {
- testenv.MustInternalLink(t, test.mustHaveCGO)
+ // N.B. none of the tests pass -asan/-msan/-asan.
+ testenv.MustInternalLink(t, testenv.SpecialBuildTypes{Cgo: test.mustHaveCGO})
}
if test.mustHaveCGO {
testenv.MustHaveCGO(t)
diff --git a/src/cmd/link/internal/ld/ld_test.go b/src/cmd/link/internal/ld/ld_test.go
index c954ab6bca..4f343f3eb8 100644
--- a/src/cmd/link/internal/ld/ld_test.go
+++ b/src/cmd/link/internal/ld/ld_test.go
@@ -21,7 +21,10 @@ func TestUndefinedRelocErrors(t *testing.T) {
// When external linking, symbols may be defined externally, so we allow
// undefined symbols and let external linker resolve. Skip the test.
- testenv.MustInternalLink(t, false)
+ //
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
t.Parallel()
diff --git a/src/cmd/link/internal/ld/macho_test.go b/src/cmd/link/internal/ld/macho_test.go
index ad02731d3a..29adc0b78b 100644
--- a/src/cmd/link/internal/ld/macho_test.go
+++ b/src/cmd/link/internal/ld/macho_test.go
@@ -66,7 +66,7 @@ func TestMachoSectionsReadOnly(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if test.mustInternalLink {
- testenv.MustInternalLink(t, test.mustHaveCGO)
+ testenv.MustInternalLink(t, testenv.SpecialBuildTypes{Cgo: test.mustHaveCGO})
}
if test.mustHaveCGO {
testenv.MustHaveCGO(t)
diff --git a/src/cmd/link/link_test.go b/src/cmd/link/link_test.go
index 53c4ee77fe..f26495a2b1 100644
--- a/src/cmd/link/link_test.go
+++ b/src/cmd/link/link_test.go
@@ -46,7 +46,9 @@ func TestIssue21703(t *testing.T) {
t.Parallel()
testenv.MustHaveGoBuild(t)
- testenv.MustInternalLink(t, false)
+ // N.B. the build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
const source = `
package main
@@ -91,7 +93,9 @@ func TestIssue28429(t *testing.T) {
t.Parallel()
testenv.MustHaveGoBuild(t)
- testenv.MustInternalLink(t, false)
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
tmpdir := t.TempDir()
@@ -189,7 +193,9 @@ main.x: relocation target main.zero not defined
func TestIssue33979(t *testing.T) {
testenv.MustHaveGoBuild(t)
testenv.MustHaveCGO(t)
- testenv.MustInternalLink(t, true)
+ // N.B. go build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
t.Parallel()
@@ -953,7 +959,9 @@ func TestIndexMismatch(t *testing.T) {
// This shouldn't happen with "go build". We invoke the compiler and the linker
// manually, and try to "trick" the linker with an inconsistent object file.
testenv.MustHaveGoBuild(t)
- testenv.MustInternalLink(t, false)
+ // N.B. the build below explictly doesn't pass through
+ // -asan/-msan/-race, so we don't care about those.
+ testenv.MustInternalLink(t, testenv.NoSpecialBuildTypes)
t.Parallel()