testing: fuzz tests not discovered unless package path specified or GOMAXPROCS=1 #47136
Labels
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.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (release meaning
dev.fuzz
)What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When running
go test -v -fuzz
withGOMAXPROCS
> 1 and./...
target, fuzzing doesn't start, the test binary just hangs. If I drop the// +build gofuzzbeta
tag, the fuzzing sometimes does start (but it is not flushed to stdout).If I set GOMAXPROCS=1 or I specify the exact path of my fuzzed package, fuzzing starts almost immediately and all the logs flush every three seconds.
Here's a concrete reproducer. Sorry for using a pre-existing project - when I tried a minimal reproducer... it all worked all of a sudden.
I even tried building go from source, introducing various
fmt.Println
s around the codebase. It seemed likeCoordinateFuzzing
was never even triggered, but I couldn't figure out why.To try and isolate as much of my local software as possible, I ran a clean
golang
Docker image, built Go's dev.fuzz from scratch and ran the test command than would hang on my Mac. It did the same thing on this linux/amd64 image, so I don't think it's specific to Darwin or my setup.What did you expect to see?
Fuzzing stats from
logStats
What did you see instead?
Nothing,
go test
hangs.The text was updated successfully, but these errors were encountered: