aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-08-27 13:45:32 -0700
committerJay Conrod <jayconrod@google.com>2021-08-31 17:53:48 +0000
commit03b8d403dc620050cf5a5ded9be6c89bcd388a70 (patch)
tree4e14cff324e85ed5133ed93b1b9197fe4a101326 /src
parent37da45d05a50419b44dcb444d280af31e5344f8e (diff)
downloadgo-03b8d403dc620050cf5a5ded9be6c89bcd388a70.tar.xz
[dev.fuzz] internal/fuzz: count coverage-only runs toward -fuzztime
When we start fuzzing, we gather baseline coverage by calling the fuzz function with each entry in the corpus (testdata, F.Add, and cache). These calls should count toward -fuzztime when it specifies a limited number of calls to the fuzz function. Change-Id: I3ff57b6d0b25e2e22bb4ce24b10f5112fb116311 Reviewed-on: https://go-review.googlesource.com/c/go/+/345769 Trust: Jay Conrod <jayconrod@google.com> Trust: Katie Hockman <katie@golang.org> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/internal/fuzz/worker.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/fuzz/worker.go b/src/internal/fuzz/worker.go
index 290e09846b..8a5c8696de 100644
--- a/src/internal/fuzz/worker.go
+++ b/src/internal/fuzz/worker.go
@@ -667,6 +667,7 @@ func (ws *workerServer) fuzz(ctx context.Context, args fuzzArgs) (resp fuzzRespo
}
if args.CoverageOnly {
+ mem.header().count++
fStart := time.Now()
err := ws.fuzzFn(CorpusEntry{Values: vals})
if err != nil {