Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking fuzzing time on engine fuzzers #4356

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vitorguidi
Copy link
Collaborator

@vitorguidi vitorguidi commented Oct 23, 2024

Motivation

Clusterfuzz only tracks fuzzing time for blackbox fuzzers at the moment, this PR extends the tracking to engine fuzzers as well by emmiting the JOB_TOTAL_FUZZ_TIME and FUZZER_TOTAL_FUZZ_TIME metrics.

Since all engine fuzzing is single process/single threaded, it suffices to track start and end time for each test case run. The only difference in behavior is that only libfuzzer indicates a timeout, and thus all other engines are expected to concentrate their metrics on timeout=False.

Testing strategy

Ran a fuzz task locally and verified the code path for _TrackFuzzTime is reached and produces sane output.
Command used:

fuzz libFuzzer libfuzzer_asan_log4j2

image

Part of #4271

@@ -1507,7 +1511,7 @@ def do_engine_fuzzing(self, engine_impl):
logs.error(f'{self.fuzz_target.binary} is not in the build.')
return [], {}

fuzzer_metadata.update(current_fuzzer_metadata)
fuzzer_metadata.update(cur_fuzzer_metadata)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid linting failure due to a line too long

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants