Skip to content

Commit

Permalink
Adjust fuzz names to fix invoke fuzz break on Linux
Browse files Browse the repository at this point in the history
The go fuzz requires that the regex given matches only a single
function. Previously `FuzzNormalizeTag` as a prefix of `FuzzNormalizeTagValue`,
breaking `invoke fuzz` when run on the trace/traceutil package on a Linux
system. This did not trigger on OS X.

Signed-off-by: Brian L. Troutwine <[email protected]>
  • Loading branch information
blt committed Nov 21, 2023
1 parent d11dc9c commit 29f18a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/trace/traceutil/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ var normalizationSeedCorpus = []string{
"A00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 000000000000",
}

func FuzzNormalizeTag(f *testing.F) {
func FuzzNormalizeOnlyTag(f *testing.F) {
normalize := func(in, _ string) (string, error) { return NormalizeTag(in), nil }
fuzzNormalization(f, normalizationSeedCorpus, maxTagLength, normalize)
}

func FuzzNormalizeTagValue(f *testing.F) {
func FuzzNormalizeTagAndValue(f *testing.F) {
normalize := func(in, _ string) (string, error) { return NormalizeTagValue(in), nil }
fuzzNormalization(f, normalizationSeedCorpus, maxTagLength, normalize)
}
Expand Down

0 comments on commit 29f18a2

Please sign in to comment.