]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: count -fuzzminimizetime toward -fuzztime
authorJay Conrod <jayconrod@google.com>
Fri, 6 Aug 2021 23:15:48 +0000 (16:15 -0700)
committerJay Conrod <jayconrod@google.com>
Tue, 31 Aug 2021 17:53:40 +0000 (17:53 +0000)
commit37da45d05a50419b44dcb444d280af31e5344f8e
treed3c071123c74529d4a56e2a0a50dbfea2b8b1505
parent7b6893d2d2f7ff22efdbc29c6729066be8857dfc
[dev.fuzz] internal/fuzz: count -fuzzminimizetime toward -fuzztime

Previously, when -fuzztime was given a number of executions like
-fuzztime=100x, this was a count for each minimization independent of
-fuzztime. Since there is no bound on the number of minimizations,
this was not a meaningful limit.

With this change, executions of the fuzz function during minimization
count toward the -fuzztime global limit. Executions are further
limited by -fuzzminimizetime.

This change also counts executions during the coverage-only run and
reports errors for those executions.

There is no change when -fuzztime specifies a duration or when
-fuzztime is not set.

Change-Id: Ibcf1b1982f28b28f6625283aa03ce66d4de0a26d
Reviewed-on: https://go-review.googlesource.com/c/go/+/342994
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>
src/cmd/go/testdata/script/test_fuzz_deadline.txt
src/cmd/go/testdata/script/test_fuzz_fuzztime.txt
src/cmd/go/testdata/script/test_fuzz_minimize.txt
src/cmd/go/testdata/script/test_fuzz_mutate_crash.txt
src/internal/fuzz/fuzz.go
src/internal/fuzz/worker.go