]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/go/go_test.go
[dev.boringcrypto] all: merge master into dev.boringcrypto
[gostls13.git] / src / cmd / go / go_test.go
index 866241bf39dcf27bcedbe1db7fbe2f44569fef2b..e85d3d25073f6a6e409e195566c868fff8d60b58 100644 (file)
@@ -4247,8 +4247,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()
@@ -4267,6 +4271,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.