Commit e8ad8a1
committed
compile_native_go_fuzzer_v2: fix handling of multiple file matches
The script uses recursive grep to find fuzzer functions, which can match
function names in multiple files. This causes fuzzer_filename to contain
multiple files, breaking the convertLibFuzzerTestcaseToStdLibGo command
during coverage builds.
Fix by searching directly for the function signature with testing.F parameter,
which only exists in the actual fuzzer test file. This avoids false matches in
files that only reference the function name in comments or helper functions.
The script now also explicitly fails if multiple matching files are found.
Required for #14183
Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>1 parent 537c800 commit e8ad8a1
1 file changed
+12
-4
lines changedLines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | | - | |
34 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
0 commit comments