diff --git a/infra/base-images/base-runner/bad_build_check b/infra/base-images/base-runner/bad_build_check index 5c39bd379..3ee7a0416 100755 --- a/infra/base-images/base-runner/bad_build_check +++ b/infra/base-images/base-runner/bad_build_check @@ -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 diff --git a/infra/base-images/base-runner/test_all.py b/infra/base-images/base-runner/test_all.py index ec7c457d9..428e49ac0 100755 --- a/infra/base-images/base-runner/test_all.py +++ b/infra/base-images/base-runner/test_all.py @@ -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):