diff options
author | Brad Fitzpatrick <bradfitz@golang.org> | 2019-04-30 17:49:54 +0000 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2019-04-30 18:20:58 +0000 |
commit | 55d690d02c30a415319d592f932bf748054539f1 (patch) | |
tree | 2129a82133edf10683991ba0c453e528879c62af | |
parent | 73cb9a1cb3d9d31a8276aaa2aebfb8b35509e05c (diff) | |
download | go-55d690d02c30a415319d592f932bf748054539f1.tar.gz go-55d690d02c30a415319d592f932bf748054539f1.zip |
encoding/gob: adding missing fuzz skip to one of the fuzz tests
It's slow & often times out randomly on longtest builders. Not useful.
Fixes #31517
Change-Id: Icedbb0c94fbe43d04e8b47d5785ac61c5e2d8750
Reviewed-on: https://go-review.googlesource.com/c/go/+/174522
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
-rw-r--r-- | src/encoding/gob/codec_test.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go index 520afde34d..494abc9b91 100644 --- a/src/encoding/gob/codec_test.go +++ b/src/encoding/gob/codec_test.go @@ -1421,8 +1421,7 @@ func encFuzzDec(rng *rand.Rand, in interface{}) error { // This does some "fuzz testing" by attempting to decode a sequence of random bytes. func TestFuzz(t *testing.T) { if !*doFuzzTests { - t.Logf("disabled; run with -gob.fuzz to enable") - return + t.Skipf("disabled; run with -gob.fuzz to enable") } // all possible inputs @@ -1441,8 +1440,7 @@ func TestFuzz(t *testing.T) { func TestFuzzRegressions(t *testing.T) { if !*doFuzzTests { - t.Logf("disabled; run with -gob.fuzz to enable") - return + t.Skipf("disabled; run with -gob.fuzz to enable") } // An instance triggering a type name of length ~102 GB. @@ -1465,6 +1463,10 @@ func testFuzz(t *testing.T, seed int64, n int, input ...interface{}) { // TestFuzzOneByte tries to decode corrupted input sequences // and checks that no panic occurs. func TestFuzzOneByte(t *testing.T) { + if !*doFuzzTests { + t.Skipf("disabled; run with -gob.fuzz to enable") + } + buf := new(bytes.Buffer) Register(OnTheFly{}) dt := newDT() |