[pw_fuzzer] Fix OSS-Fuzz coverage: emit absolute source paths for the FuzzTest toolchain#72705
Merged
mergify[bot] merged 1 commit intoJun 23, 2026
Merged
Conversation
…ed relative_paths) Pigweed's $dir_pw_build:relative_paths config (-ffile-prefix-map) rewrites the chip_pw_fuzztest toolchain's source paths to repo-relative (src/..., out/...). OSS-Fuzz's coverage report resolves only absolute paths (llvm-cov -path-equivalence=/,$OUT), so the FuzzTest binaries' relative paths break report generation, which aborts on an out-of-tree path (out/usr/include/glib-2.0/...). The legacy chip fuzz targets use chip's own (non-pigweed) toolchain with no relative_paths (absolute paths), which coverage already handled. Drop relative_paths under oss_fuzz so chip_pw_fuzztest records absolute paths. Verified by reproducing the OSS-Fuzz coverage build (infra/helper.py build_fuzzers --sanitizer coverage + coverage): the report now generates.
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the chip_pw_fuzztest toolchain configuration in build/toolchain/pw_fuzzer/BUILD.gn to remove Pigweed's relative_paths config when building for OSS-Fuzz (oss_fuzz is true). This ensures absolute paths are retained, preventing issues with OSS-Fuzz coverage report generation which relies on absolute paths. There are no review comments, and I have no feedback to provide.
andy31415
approved these changes
Jun 23, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #72705 +/- ##
==========================================
+ Coverage 56.09% 56.76% +0.66%
==========================================
Files 1640 1634 -6
Lines 112467 112660 +193
Branches 13318 13143 -175
==========================================
+ Hits 63087 63948 +861
+ Misses 49380 48712 -668 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
PR #72705: Size comparison from 44fb474 to cc7abd8 Full report (33 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
After the pw_fuzzer / Google FuzzTest OSS-Fuzz integration (#72573) landed, OSS-Fuzz's periodic coverage build started failing during report generation (the
address/undefinedbuilds andcheck_buildare unaffected):llvm-cov -path-equivalence=/,$OUT— i.e. it expects absolute paths (the builder's$SRCis copied into$OUT/$SRC).chip_pw_fuzztesttoolchain inherits pigweed's$dir_pw_build:relative_pathsconfig, whose-ffile-prefix-maptransforms rewrite source paths to repo-relative (src/..., out-dir files toout/...). So the FuzzTest binaries record relative paths that don't remap, and the report aborts on an out-of-tree path.relative_paths, so they record absolute paths — which is why coverage worked before the integration.Solution
Drop the
relative_pathsconfig from thechip_pw_fuzztesttoolchain undeross_fuzz, so it records absolute source paths like the legacy chip fuzz targets. Local builds are unchanged (they keeprelative_paths; local coverage resolves relative paths from the repo root).Related issues
Follow-up to #72573 (the FuzzTest OSS-Fuzz integration that introduced the regression).
Testing
Reproduced the OSS-Fuzz coverage build end-to-end against this change:
AssertionErrorabove (non-zero exit).Successfully generated clang code coverage report; the FuzzTest sources now resolve and the previously-fatalglibpath no longer appears in the summary.