]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.fuzz] internal/fuzz: read and write interesting values in fuzz cache
authorJay Conrod <jayconrod@google.com>
Fri, 4 Dec 2020 23:27:09 +0000 (18:27 -0500)
committerJay Conrod <jayconrod@google.com>
Mon, 21 Dec 2020 21:33:57 +0000 (21:33 +0000)
commit0e21d5be3790a55484f1dfcad6d8b1d2f253600e
tree83e2339c886e27b21d6625cb0a270fc6894cb9e8
parent97df3ba792bda80b99a8508cf36dfba3d1c37576
[dev.fuzz] internal/fuzz: read and write interesting values in fuzz cache

'go test -fuzz' may now read and write interesting fuzzing values to
directories in $GOCACHE/fuzz. Files in this directory are named
$pkg/$test/$hash where $pkg is the package path containing the fuzz
target, $test is the target name, and $hash is the SHA-256 sum of the
data in the file.

Note that different versions of the same package or packages with the
same path from different modules may share the same directory.

Although files are written into a subdirectory of GOCACHE, they are
not removed automatically, nor are they removed by 'go clean -cache'.
Instead, they may be removed with 'go clean -fuzzcache'. We chose to
nest the fuzzing directory inside GOCACHE to avoid introducing a new
environment variable, since there's no real need for users to specify
a separate directory.

Change-Id: I2032cf8e6c92f715cf36a9fc6a550acf666d2382
Reviewed-on: https://go-review.googlesource.com/c/go/+/275534
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Katie Hockman <katie@golang.org>
Trust: Katie Hockman <katie@golang.org>
Trust: Jay Conrod <jayconrod@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/cache/cache.go
src/cmd/go/internal/clean/clean.go
src/cmd/go/internal/test/flagdefs_test.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/test/testflag.go
src/cmd/go/testdata/script/test_fuzz_cache.txt [new file with mode: 0644]
src/internal/fuzz/fuzz.go
src/testing/fuzz.go
src/testing/internal/testdeps/deps.go
src/testing/testing.go