go test -fuzz='^FuzzName$' uses default value of -run flag and runs all regular tests as well
What version of Go are you using (
The text was updated successfully, but these errors were encountered:
Interesting to see that we have a test which specifically locks this behavior in:
Lines 35 to 42 in 95b240b
It seems like it was added in b894834 by @katiehockman. It sounds like a relatively straightforward fix, be it amending the docs, or updating the code to follow the docs. The simplest fix in terms of code might be to have
@katiehockman in terms of docs, it probably was only the draft proposal that made me think the behaviour wasn’t matching the design, or perhaps something I saw in the old
EDIT: I've also now read through the latest https://pkg.go.dev/testing@master#hdr-Fuzzing which probably should have been my starting point, rather than https://go.dev/doc/fuzz/ as it does explain and even has "The -fuzz and -run flags can both be set, in order to fuzz a target but skip the execution of all other tests"
I guess one of the unexpected parts of the current behaviour is that even if I've already run through all of the tests myself via
It's a shame we can't preserve the testcache ignoring
That's an interesting idea. I can see your point about that fact that running
One possible issue is that the binary isn't exactly the same, because running
Bump. Can we get this poor UX fixed? It is annoying and unexpected that passing in
I would also like to offer some other suggestions regarding UX of fuzzing:
I understand that this issue may not be the best place to discuss any of those. Please point me/move this post elsewhere if there is a better place to discuss them. Also, sorry for not doing an exhaustive research if those were already discussed or planned.