]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] testing: exit after f.Fuzz function
authorKatie Hockman <katie@golang.org>
Wed, 7 Oct 2020 18:08:53 +0000 (14:08 -0400)
committerFilippo Valsorda <filippo@golang.org>
Fri, 4 Dec 2020 18:17:29 +0000 (19:17 +0100)
commit0a6f004cb1ed99bc225f4fe3cba5c2c5b901b442
treec2e15074ba2c6838d5f108ffc5e1a40e2f199898
parent555797058ae41e3cc0825831520dee7fb77b3ce5
[dev.fuzz] testing: exit after f.Fuzz function

This change causes f.Fuzz to call runtime.GoExit
when it has finished running. This would mean that
any code after an f.Fuzz function within a fuzz
target would not be executed.

In the future, vet should fail if someone tries to
do this.

This change also adds the missing code that would
execute any cleanup functions added by f.Cleanup.

Change-Id: Ib4d1e6bcafbe189986d0667a1e87dabae67ee621
Reviewed-on: https://go-review.googlesource.com/c/go/+/260338
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/testdata/script/test_fuzz.txt
src/testing/fuzz.go