diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index 03e9eeda9b..22018f9372 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -430,6 +430,10 @@ func runTest(cmd *Command, args []string) { // Mark all the coverage packages for rebuilding with coverage. for _, p := range testCoverPkgs { + // There is nothing to cover in package unsafe; it comes from the compiler. + if p.ImportPath == "unsafe" { + continue + } p.Stale = true // rebuild p.fake = true // do not warn about rebuild p.coverMode = testCoverMode