]> Cypherpunks repositories - gostls13.git/commit
[dev.fuzz] testing,internal/fuzz: support structured inputs
authorKatie Hockman <katie@golang.org>
Thu, 18 Feb 2021 20:42:05 +0000 (15:42 -0500)
committerKatie Hockman <katie@golang.org>
Tue, 23 Feb 2021 21:10:06 +0000 (21:10 +0000)
commit621a81aba0fd5fc7ceb297ede3627819fc59728c
tree864c6c115323aff6b7c8b15961ad4533becc8b84
parent5aacd47c002c39b481c4c7a0663e851758da372a
[dev.fuzz] testing,internal/fuzz: support structured inputs

This change makes several refactors to start supporting
structured fuzzing. The mutator can still only mutate
byte slices, and future changes will be made to support
mutating other types. However, it does now support
fuzzing more than one []byte.

This change also makes it so that corpus entries are
encoded in the new file format when being written to
testdata or GOCACHE. Any existing GOCACHE data should
be deleted from your local workstation to allow tests
to pass locally.

Change-Id: Iab8fe01a5dc870f0c53010b9d5b0b479bbdb310d
Reviewed-on: https://go-review.googlesource.com/c/go/+/293810
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/testdata/script/test_fuzz.txt
src/cmd/go/testdata/script/test_fuzz_mutate_crash.txt
src/cmd/go/testdata/script/test_fuzz_mutator.txt
src/internal/fuzz/encoding.go
src/internal/fuzz/fuzz.go
src/internal/fuzz/mutator.go
src/internal/fuzz/worker.go
src/testing/fuzz.go
src/testing/internal/testdeps/deps.go
src/testing/testing.go