]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/go/go_test.go
[dev.boringcrypto] all: merge master (nearly Go 1.10 beta 1) into dev.boringcrypto
[gostls13.git] / src / cmd / go / go_test.go
index e0ac90dddfc49cab7698bbfa86b284cdcf2c4c24..75d65b7235a67ed2e733075ad277fd94284965f2 100644 (file)
@@ -3961,8 +3961,12 @@ func TestBinaryOnlyPackages(t *testing.T) {
        tg.grepStdout("false", "did not see BinaryOnly=false for p4")
 }
 
-// Issue 16050.
-func TestAlwaysLinkSysoFiles(t *testing.T) {
+// Issue 16050 and 21884.
+func TestLinkSysoFiles(t *testing.T) {
+       if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
+               t.Skip("not linux/amd64")
+       }
+
        tg := testgo(t)
        defer tg.cleanup()
        tg.parallel()
@@ -3981,6 +3985,10 @@ func TestAlwaysLinkSysoFiles(t *testing.T) {
        tg.setenv("CGO_ENABLED", "0")
        tg.run("list", "-f", "{{.SysoFiles}}", "syso")
        tg.grepStdout("a.syso", "missing syso file with CGO_ENABLED=0")
+
+       tg.setenv("CGO_ENABLED", "1")
+       tg.run("list", "-msan", "-f", "{{.SysoFiles}}", "syso")
+       tg.grepStdoutNot("a.syso", "unexpected syso file with -msan")
 }
 
 // Issue 16120.