Fix if fuzzers generate coverage from > 1 process.

Some types of fuzzer generate code coverage information from more than
one process ID.

The key case is fuzztests, where we have a small wrapper executable that
exists to pass the correct flags to the main fuzztest executable. We're
primarily interested in the coverage achieved by the main fuzztest
executable.

Other cases might be complex fuzzers where Chrome runs in multi-process
mode with separate renderer and browser processes.

With this change, we ask the executables to write out coverage
information to a path containing %p, which represents the process ID.
We then absorb any and all such files that are written out.

Testing performed:
autoninja -C out/coverage testing/libfuzzer/fuzzers:libyuv_scale_fuzztest_ScaleFuzz_ScaleDoesNotCrash_fuzzer__generate
python3 tools/code_coverage/download_fuzz_corpora.py --download-dir current-corpora-from-clusterfuzz --build-dir out/coverage/
python3 tools/code_coverage/run_all_fuzzers.py --fuzzer-binaries-dir out/coverage/ --fuzzer-corpora-dir current-corpora-from-clusterfuzz --profdata-outdir out/profdata-outdir
third_party/llvm-build/Release+Asserts/bin/llvm-cov report out/coverage/libyuv_scale_fuzztest -instr-profile=out/profdata-outdir/libyuv_scale_fuzztest_ScaleFuzz_ScaleDoesNotCrash_fuzzer.profdata
Confirm the output mentions the actual scaling algorithms

Bug: 342383811
Change-Id: I8b9faf6eaa58a525259a9b1b11dd4a9e524b9947
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5570044
Reviewed-by: Titouan Rigoudy <titouan@chromium.org>
Commit-Queue: Adrian Taylor <adetaylor@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1305670}
NOKEYCHECK=True
GitOrigin-RevId: 639f7bbbbec74a7adb1526307d95ee0bc3c2e51f
1 file changed