summaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/test
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-08-16 15:09:05 -0700
committerJay Conrod <jayconrod@google.com>2021-08-20 20:13:57 +0000
commitf89b4c8d82c028d635eb8e685dd92dceb0027438 (patch)
tree1f1f12caaa7569e2fe1d59eede07a923a4ae6880 /src/cmd/go/internal/test
parent4e07341afd65e4000466b6b324781e8c3565a0d9 (diff)
downloadgo-git-f89b4c8d82c028d635eb8e685dd92dceb0027438.tar.gz
[dev.fuzz] cmd/go: exclude additional packages from fuzzing instrumentation
Counters in these packages are incremented by background goroutines for testing and internal/fuzz. They cause some inputs to seem "interesting" when they don't directly provide new coverage. Updates golang/go#46410 Change-Id: Ibe6bb3177f3b2ba23382a1693a4c6a576f94a423 Reviewed-on: https://go-review.googlesource.com/c/go/+/342993 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Roland Shoemaker <roland@golang.org>
Diffstat (limited to 'src/cmd/go/internal/test')
-rw-r--r--src/cmd/go/internal/test/test.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index 012a75123b..75345a8223 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -831,11 +831,18 @@ func runTest(ctx context.Context, cmd *base.Command, args []string) {
fuzzFlags := work.FuzzInstrumentFlags()
if testFuzz != "" && fuzzFlags != nil {
// Don't instrument packages which may affect coverage guidance but are
- // unlikely to be useful.
+ // unlikely to be useful. Most of these are used by the testing or
+ // internal/fuzz concurrently with fuzzing.
var fuzzNoInstrument = map[string]bool{
- "testing": true,
+ "context": true,
"internal/fuzz": true,
+ "reflect": true,
"runtime": true,
+ "sync": true,
+ "sync/atomic": true,
+ "syscall": true,
+ "testing": true,
+ "time": true,
}
for _, p := range load.TestPackageList(ctx, pkgOpts, pkgs) {
if fuzzNoInstrument[p.ImportPath] {