Open mateusz834 opened 2 weeks ago
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
This is relevant #50456 (TLDR: Add
should behave as the AddNamed
proposed here, not possible now because of breaking API changes)
It sounds like this is either a likely decline or a 'on hold'. Given that we are not making changes for Go 1.18, perhaps it should be declined for now, and then a new proposal with a different API can be proposed if we need it?
CC @golang/fuzzing
Proposal Details
Currently the corpus entries ("sub-tests") added by
(*testing.F).Add()
are named like:FuzzMyFuzz/seed#0
. In my case i am populating the fuzz corpus with file contents from the testdata directory, because of the default naming there is no easy way to quickly map seed corpus to a file (for-run
, to run only one test from the corpus), to do so i need tot.Log
the file contents in thef.Fuzz
and figure out which file contains that data, this is annoying, especially that while adding a corpus entry the file name is known.I propose to add following function to the testing package to solve this issue: