]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz,testing: treat panics as recoverable
authorRoland Shoemaker <roland@golang.org>
Wed, 19 May 2021 18:43:58 +0000 (11:43 -0700)
committerRoland Shoemaker <roland@golang.org>
Thu, 27 May 2021 02:14:18 +0000 (02:14 +0000)
commit5fcd18bc9bd89bad5270434f99d40e820affbd82
tree10df22a9eba3f771c7f4a3d8d27b18b11c011264
parentff0164cf736b12740bf5837111e93130da6d612c
[dev.fuzz] internal/fuzz,testing: treat panics as recoverable

And only log the last panic, not all of them, during minimization.
This change makes the worker processes quiet, so now the only
process that logs anything is the coordinator. This hides all of
the panics caused during minimization of an input which causes
a panic.

This change also alters the usage of tRunner such that we now
recover from recoverable panics instead of terminating the
process. This results in larger stack traces, since we include
a bit more of the trace within testing. There is a TODO to see
if it's possible to slice the stack up so that it is somewhat
more informative.

Change-Id: Ic85eabd2e70b078412fbb88adf424a8da25af876
Reviewed-on: https://go-review.googlesource.com/c/go/+/321230
Trust: Roland Shoemaker <roland@golang.org>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
src/cmd/go/testdata/script/test_fuzz_mutator.txt
src/internal/fuzz/worker.go
src/testing/fuzz.go
src/testing/testing.go