Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: fuzzing output adjustments #48132

Closed
rsc opened this issue Sep 2, 2021 · 3 comments
Closed

cmd/go: fuzzing output adjustments #48132

rsc opened this issue Sep 2, 2021 · 3 comments

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Sep 2, 2021

The current chatty fuzzing output should be more amenable to processing with test2json. There are only minor changes needed:

  • It should start with a 'test beginning' header the same as when a regular test runs.
  • Having done that, the "fuzzing," prefix should probably be "fuzz:", and all the output lines should begin with that, to separate them from prints.
  • 'found a crash, minimizing...' should be 'fuzz: found a %d-byte crash input; minimizing'.

/cc @jayconrod @katiehockman

@rsc rsc added this to the Go1.18 milestone Sep 2, 2021
@rsc
Copy link
Contributor Author

@rsc rsc commented Sep 2, 2021

I see now that the header does happen with -v, just not without -v.
That is probably OK, since test2json requires -v.
But the other adjustments should still be applied.

@rsc rsc changed the title cmd/go: fuzzing output needs to be compatible with go tool test2json cmd/go: fuzzing output adjustments Sep 2, 2021
@rsc
Copy link
Contributor Author

@rsc rsc commented Sep 2, 2021

Watching the output more, it would help to use d.Round(1*time.Second).String() to format the elapsed duration d, instead of printing number of seconds. It gets tiring to do the mental math on lines like

fuzzing, elapsed: 1389.0s, execs: 67961175 (48928/sec), workers: 16, interesting: 334

Duration.String would say 23m9s instead.

@jayconrod jayconrod added the fuzz label Sep 9, 2021
@katiehockman katiehockman self-assigned this Sep 14, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Sep 14, 2021

Change https://golang.org/cl/349970 mentions this issue: [dev.fuzz] internal: fuzzing output adjustments

gopherbot pushed a commit that referenced this issue Sep 15, 2021
Print the elapsed time as a nicely formatted duration, and
make small adjustments to the command line output while fuzzing.

Fixes #48132

Change-Id: Id95f84c0939171a777448c444d9b87d7af26b654
Reviewed-on: https://go-review.googlesource.com/c/go/+/349970
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants