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

[dev.fuzz] cmd/go: fuzzer output buffered/missing when testing a sub package #47603

Closed
stevenjohnstone opened this issue Aug 9, 2021 · 2 comments
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done.

Comments

@stevenjohnstone
Copy link
Contributor

What version of Go are you using (go version)?

$ go version
go version devel go1.17-4e07341afd Tue Aug 3 21:00:45 2021 +0000 linux/amd64

Does this issue reproduce with the latest release?

n/a

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/stevie/.cache/go-build"
GOENV="/home/stevie/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/stevie/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/stevie/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/stevie/sdk/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/stevie/sdk/gotip/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.17-4e07341afd Tue Aug 3 21:00:45 2021 +0000"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/stevie/code/silent/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build4292016643=/tmp/go-build -gno-record-gcc-switches"

What did you do?

In #fuzzing over in the gopher slack, @benhoyt reported that a fuzzer didn't give output. I made a minimal setup to reproduce the problem at https://github.com/stevenjohnstone/silent-beta-fuzz.

If you run the fuzzer outside of the package under test by specifying the package path, the output is lost.

What did you expect to see?

The usual output every 3 seconds

What did you see instead?

No output

@seankhliao seankhliao added fuzz Issues related to native fuzzing support NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 9, 2021
@jayconrod jayconrod changed the title [dev.fuzz] fuzzer output buffered/missing when testing a sub package [dev.fuzz] cmd/go: fuzzer output buffered/missing when testing a sub package Aug 9, 2021
@jayconrod jayconrod added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 9, 2021
@jayconrod
Copy link
Contributor

Thanks for reporting this. I think I've seen this before... it has something to do with how go test buffers output from test processes. In any case, we do need to fix this.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/344831 mentions this issue: [dev.fuzz] cmd/go: stream output when fuzzing

gopherbot pushed a commit that referenced this issue Sep 1, 2021

Verified

This commit was signed with the committer’s verified signature.
myitcv Paul Jolly
Previously, 'go test' streamed output when there were no package
arguments or when benchmarking. This CL expands that to include
fuzzing to ensure that coordinator progress messages are printed.

This change tweaks tests and output a little bit: the output is
slightly different depending on whether it was streamed or buffered in
'go test'.

Fixes #47603

Change-Id: I387470062cf0620f5c7f214b6f54039c921912c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/344831
Trust: Jay Conrod <jayconrod@google.com>
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Katie Hockman <katie@golang.org>
@golang golang locked and limited conversation to collaborators Sep 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge fuzz Issues related to native fuzzing support NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: No status
Development

No branches or pull requests

5 participants