mirror of https://github.com/google/oss-fuzz.git
Always add `testing` package usage in native_go_fuzzer (#8546)
This fixes an issue where the `testing.F` is replaced with a new package; if this was the only usage of `testing` in the file then we end up with `testing` being an unused import. A workaround for this is to just always use `testing` via some placeholder variable.
This commit is contained in:
parent
20ab1292c1
commit
880dba286e
|
@ -33,6 +33,7 @@ function rewrite_go_fuzz_harness() {
|
|||
# Import https://github.com/AdamKorcz/go-118-fuzz-build.
|
||||
# This changes the line numbers from the original fuzzer.
|
||||
addimport -path "${fuzzer_fn}"
|
||||
echo -e "\nvar _ = testing.Verbose // Ensure testing import remains\n" >> "${fuzzer_fn}"
|
||||
}
|
||||
|
||||
function build_native_go_fuzzer() {
|
||||
|
|
Loading…
Reference in New Issue