cmd/go: -run= not working with fuzz subtest names #48149
Bug 1t: The re-run command should not include the package name if I didn't include the package name. That is, if I ran
Bug 2: The -run= argument does not match the test failure:
Note that the failure has an extra 'testdata/corpus' in its name. I assume that was meant to be left out of the name printed by the test.
Bug 3: The -run argument does not work to select subtests of fuzz targets:
The text was updated successfully, but these errors were encountered:
@rsc Can you clarify what you mean here? I don't see the bug. Are you just noting that it says 'testdata/corpus' (now 'testdata/fuzz') in the fail line? That's because it corresponds to the corpus file written in 'testdata/corpus'
Ah I think I understand what @rsc is saying now. Correct me if I'm wrong, but it sounds like the confusion is because the test is runnable with
Will work on these.
Bug 3 is going to be a bit difficult to fix, but not impossible.
The trickiest bit is that we have to load the corpus in order to know which seed corpus entries (if any) that the
When in reality it should look like this:
One possible solution is to load all of the seed corpus in
Will keep looking into it.
This actually might not be as complicated as I thought. If we treat this the same way that we treat subtests with t.Run, then it's fine to print the
This change fixes some issues with -run, and the subsequent command line output when running in verbose mode. It replaces CorpusEntry.Name with CorpusEntry.Path, and refactors the code accordingly. This change also adds a lot of additional tests which check explicit command line output when fuzz targets are run without fuzzing. This will be important to avoid regressions. Updates #48149 Change-Id: If34b1f51db646317b7b51c3c38ae53231d01f568 Reviewed-on: https://go-review.googlesource.com/c/go/+/354632 Trust: Katie Hockman <firstname.lastname@example.org> Run-TryBot: Katie Hockman <email@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Reviewed-by: Jay Conrod <email@example.com>
I'm not actually sure how to fix Bug 1t.
The goal of that is to only print the package name in the