]> Cypherpunks repositories - gostls13.git/commit
internal/fuzz: log that minimization is occurring
authorKatie Hockman <katie@golang.org>
Wed, 6 Oct 2021 18:13:23 +0000 (14:13 -0400)
committerKatie Hockman <katie@golang.org>
Thu, 7 Oct 2021 20:37:43 +0000 (20:37 +0000)
commitef2ebbebf976fba17bb97ed285e9c3d10b192d74
tree90bf5d448a1a05f365f5ba708899fd7bff93f713
parent0f52292e72ebbb79b2d41c8dca8e23ef9597e17d
internal/fuzz: log that minimization is occurring

Previously, when fuzzing for a period of time, the
command line output would look something like this:

   fuzz: minimizing 34995-byte crash input...
   fuzz: elapsed: 3s, execs: 13821 (4604/sec), new interesting: 0 (total: 1)
   fuzz: elapsed: 6s, execs: 13821 (2303/sec), new interesting: 0 (total: 1)
   fuzz: elapsed: 9s, execs: 13821 (1535/sec), new interesting: 0 (total: 1)
   --- FAIL: FuzzFoo (9.05s)

This is the same output it has while fuzzing, so if
minimization runs for a long time (default allows 1
minute), then it looks like minimization is hanging.
It's also confusing that the execs/sec would continually
decrease.

Now, when minimization is running, the command line
output will look something like this:

   fuzz: minimizing 34995-byte crash input...
   fuzz: elapsed: 3s, minimizing
   fuzz: elapsed: 6s, minimizing
   fuzz: elapsed: 9s, minimizing
   fuzz: elapsed: 9s, minimizing
   --- FAIL: FuzzFoo (9.05s)

The final "fuzz: elapsed: 6s, minimizing" could be
printed twice because we always print one final log
to the command line before we exit.

Updates #48820

Change-Id: Ie5b9fde48b8d4e36e13a81ae50a6d69bf4d0dbe3
Reviewed-on: https://go-review.googlesource.com/c/go/+/354371
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/testdata/script/test_fuzz_minimize.txt
src/internal/fuzz/fuzz.go