You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running go test -v -fuzz with GOMAXPROCS > 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.
# commit 7d9672fab55920d245a0b78636e4ba512c025930
git clone https://github.com/kokes/smda -b experiments/fuzzing
# this hangs
GOMAXPROCS=2 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./...
# these two work
GOMAXPROCS=1 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./...
GOMAXPROCS=2 gotip test -v -run=NONE -fuzz=FuzzDelimiter ./src/database
I even tried building go from source, introducing various fmt.Printlns around the codebase. It seemed like CoordinateFuzzing 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:
Thanks for reporting this. I believe this is a symptom of #46312: we don't yet have support for fuzzing multiple targets in multiple packages.
I tried this out, and go test did appear to hang. ps showed a couple of worker processes running on github.com/kokes/smda/src/database. I sent SIGINT to one of them, and the whole command wrapped up with normal output printed all at once:
changed the title
[dev.fuzz] testing: tests not discovered unless package path specified or GOMAXPROCS=1
testing: fuzz tests not discovered unless package path specified or GOMAXPROCS=1
Sep 21, 2021