]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix TestScript/test_fuzz_minimize_interesting flake
authorRoland Shoemaker <roland@golang.org>
Tue, 12 Apr 2022 00:52:55 +0000 (17:52 -0700)
committerRoland Shoemaker <roland@golang.org>
Tue, 12 Apr 2022 22:35:20 +0000 (22:35 +0000)
commitfc1d4c11dfff3cad0389b32e9fa698a389807e3a
treebbf80bd867fdcf7b802b3599ddf53a65ff64a8c0
parent6183920a33c21725ad21d67bee8c1eebb5d30a90
cmd/go: fix TestScript/test_fuzz_minimize_interesting flake

check_testdata/check_testdata.go used the encoding of the corpus entry
file, rather than the input string itself, when checking the expected
size of the minimized value. Instead, use the actual byte length, which
should bypass flakiness.

While we are here, use somewhat simpler fuzz targets, that use byte
slices rather than strings, and only execute the targets when fuzzing (
skipping the 'run' phase.)

Fixes #52285

Change-Id: I48c3780934891eec4a9e38d93abb4666091cb580
Reviewed-on: https://go-review.googlesource.com/c/go/+/399814
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/testdata/script/test_fuzz_minimize_interesting.txt