microsoft / onefuzz

A self-hosted Fuzzing-As-A-Service platform
MIT License
2.82k stars 199 forks source link

Add cache for coverage locations and debuginfo #3218

Closed ranweiler closed 1 year ago

ranweiler commented 1 year ago

Closes #3216.

This PR does not implement caching or analysis reuse in the OneFuzz coverage task, but is a preqreq for doing so.

ranweiler commented 1 year ago

Manually tested using the updated record example to ensure the cache is being hit when testing multiple inputs against the same target using the -d option.

codecov-commenter commented 1 year ago

Codecov Report

Merging #3218 (ecf0c9f) into main (e603fa9) will increase coverage by 0.05%. The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main    #3218      +/-   ##
==========================================
+ Coverage   29.49%   29.54%   +0.05%     
==========================================
  Files         332      332              
  Lines       39106    39195      +89     
==========================================
+ Hits        11535    11582      +47     
- Misses      27571    27613      +42     
Impacted Files Coverage Δ
src/agent/coverage/src/record.rs 75.45% <50.00%> (-2.44%) :arrow_down:
src/agent/coverage/src/binary.rs 54.59% <55.12%> (-15.70%) :arrow_down:
src/agent/coverage/src/record/windows.rs 25.26% <85.71%> (+2.06%) :arrow_up:
src/agent/coverage/src/record/linux.rs 65.21% <100.00%> (+2.71%) :arrow_up:

... and 3 files with indirect coverage changes

ranweiler commented 1 year ago

Integration tests passed, manually inspected coverage output files.