1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:40:03 -07:00

cmd/go: make TestScript/test_fuzz_minimize_dirty_cov use less memory

The test doesn't need to be as aggressive, it _should_ still tickle
the right paths with high enough probability. This should
significantly reduce the memory it consumes, which is at a premium
when testing fuzzing things.

Fixes #52744

Change-Id: I4d8dd5b29e65fb429962850b3f4477982452c856
Reviewed-on: https://go-review.googlesource.com/c/go/+/404634
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
This commit is contained in:
Roland Shoemaker 2022-05-06 10:15:49 -07:00
parent d4dd7acd2e
commit 5a4ba6d905

View File

@ -10,8 +10,8 @@
[!fuzz-instrumented] skip
env GOCACHE=$WORK/gocache
go test -fuzz=FuzzCovMin -fuzztime=25s -test.fuzzcachedir=$GOCACHE/fuzz
go run check_file/main.go $GOCACHE/fuzz/FuzzCovMin abcd
go test -fuzz=FuzzCovMin -fuzztime=500000x -test.fuzzcachedir=$GOCACHE/fuzz
go run check_file/main.go $GOCACHE/fuzz/FuzzCovMin ab
-- go.mod --
module test
@ -22,8 +22,9 @@ package covmin
import "testing"
func FuzzCovMin(f *testing.F) {
f.Add([]byte("aa"))
f.Fuzz(func(t *testing.T, data []byte) {
if len(data) >= 4 && data[0] == 'a' && data[1] == 'b' && data[2] == 'c' && data[3] == 'd' {
if len(data) == 2 && data[0] == 'a' && data[1] == 'b' {
return
}
})