]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: make minimization tests more reliable
authorJay Conrod <jayconrod@google.com>
Fri, 14 May 2021 17:59:26 +0000 (13:59 -0400)
committerJay Conrod <jayconrod@google.com>
Wed, 19 May 2021 16:43:15 +0000 (16:43 +0000)
commitad24be022be1c3124887ff22fc742494ee12dfb8
treea5e8d7da6bf2dd59ac3009be6ca357a6cb1ccd66
parent2212a1a339c7ac72ff2133855c97ae097444cb5c
[dev.fuzz] internal/fuzz: make minimization tests more reliable

* Introduced -fuzzminimizetime flag to control the number of time or
  the number of calls to spend minimizing. Defaults to 60s. Only works
  for unrecoverable crashes for now.
* Moved the count (used by -fuzztime=1000x) into shared
  memory. Calling workerClient.fuzz resets it, but it will remain
  after the worker processes crashes. workerClient.minimize resets it
  once before restarting the worker the first time, but the total
  number of runs should still be limited during minimization, even
  after multiple terminations and restarts.
* Renamed fuzzArgs.Count to Limit to avoid confusion.
* Several other small fixes and refactorings.

Change-Id: I03faa4c94405041f6dfe48568e5ead502f8dbbd2
Reviewed-on: https://go-review.googlesource.com/c/go/+/320171
Trust: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
src/cmd/go/internal/test/flagdefs.go
src/cmd/go/internal/test/testflag.go
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/mem.go
src/internal/fuzz/worker.go
src/testing/fuzz.go
src/testing/internal/testdeps/deps.go
src/testing/testing.go