Skip to content

Commit 8e9ca03

Browse files
authored
Enable skipping minimization with an env var (#4526)
This enables a job or fuzzer config to disable minimization with an environment variable. We can specify this at the additional environment variables of particular fuzzers like Binaryen, that don't work well with Clusterfuzz' built-in minimization attempts. Bug: https://crbug.com/380264190
1 parent 785c01f commit 8e9ca03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/clusterfuzz/_internal/system/environment.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,9 +695,11 @@ def get_engine_for_job(job_name=None):
695695
def is_minimization_supported():
696696
"""Return True if the current job supports minimization.
697697
698-
Currently blackbox-fuzzer jobs or libfuzzer support minimization.
698+
Currently blackbox-fuzzer jobs or libfuzzer support minimization, unless
699+
skipped using the SKIP_MINIMIZATION environment variable.
699700
"""
700-
return not is_engine_fuzzer_job() or is_libfuzzer_job()
701+
skipped = get_value('SKIP_MINIMIZATION', False)
702+
return not skipped and (not is_engine_fuzzer_job() or is_libfuzzer_job())
701703

702704

703705
def is_posix():

0 commit comments

Comments
 (0)