mirror of https://github.com/google/oss-fuzz.git
Fix centipede's bad_build_check projects with many targets (#9606)
This commit is contained in:
parent
533df2c728
commit
860447a712
|
@ -122,8 +122,6 @@ function check_engine {
|
|||
# binaries if they are from trial build and production build.
|
||||
# TODO(Dongge): Support run test with sanitized binaries for trial and
|
||||
# production build.
|
||||
CENTIPEDE_WORKDIR=/tmp/centipede-workdir
|
||||
mkdir -p $CENTIPEDE_WORKDIR
|
||||
SKIP_SEED_CORPUS=1 timeout --preserve-status -s INT 20s run_fuzzer $FUZZER_NAME &>$FUZZER_OUTPUT
|
||||
CHECK_PASSED=$(egrep "\[0] begin-fuzz: ft: 0 cov: 0" -c $FUZZER_OUTPUT)
|
||||
if (( $CHECK_PASSED == 0 )); then
|
||||
|
|
|
@ -111,10 +111,15 @@ def do_bad_build_check(fuzz_target):
|
|||
auxiliary = []
|
||||
|
||||
command = ['bad_build_check', fuzz_target] + auxiliary
|
||||
return subprocess.run(command,
|
||||
stderr=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
check=False)
|
||||
with tempfile.TemporaryDirectory() as temp_centipede_workdir:
|
||||
# Do this so that centipede doesn't fill up the disk during bad build check
|
||||
env = os.environ.copy()
|
||||
env['CENTIPEDE_WORKDIR'] = temp_centipede_workdir
|
||||
return subprocess.run(command,
|
||||
stderr=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
env=env,
|
||||
check=False)
|
||||
|
||||
|
||||
def get_broken_fuzz_targets(bad_build_results, fuzz_targets):
|
||||
|
|
Loading…
Reference in New Issue