]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.fuzz] testing: let -fuzztime specify a number of executions
authorJay Conrod <jayconrod@google.com>
Fri, 2 Apr 2021 18:36:08 +0000 (14:36 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 9 Apr 2021 19:51:56 +0000 (19:51 +0000)
commit4baa39ca22c34d4c224ac69da644c85dee196474
tree7283ef3bb94f43a91e2a5cc297467e9d9e13d8d8
parent4cde035a720448b2bca07ecdc12beef3b1322939
[dev.fuzz] testing: let -fuzztime specify a number of executions

-fuzztime now works similarly to -benchtime: if it's given a string
with an "x" suffix (as opposed to "s" or some other unit of
duration), the fuzzing system will generate and run a maximum number
of values.

This CL also implements tracking and printing counts, since most of
the work was already done.

Change-Id: I013007984b5adfc1a751c379dc98c8d46b4a97e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/306909
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>
15 files changed:
src/cmd/go/internal/test/testflag.go
src/cmd/go/testdata/script/test_fuzz.txt
src/cmd/go/testdata/script/test_fuzz_cache.txt
src/cmd/go/testdata/script/test_fuzz_chatty.txt
src/cmd/go/testdata/script/test_fuzz_fuzztime.txt
src/cmd/go/testdata/script/test_fuzz_match.txt
src/cmd/go/testdata/script/test_fuzz_mutate_crash.txt
src/cmd/go/testdata/script/test_fuzz_mutator.txt
src/internal/fuzz/fuzz.go
src/internal/fuzz/worker.go
src/testing/benchmark.go
src/testing/fuzz.go
src/testing/internal/testdeps/deps.go
src/testing/sub_test.go
src/testing/testing.go