From dd5ad3b20e9abd7e7be69e7c313d8686d2c4d20f Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Wed, 19 Feb 2020 16:40:23 -0800 Subject: [PATCH] [infra] Loose the limits for dataflow traces collection (#1632). (#3411) * [infra] Loose the limits for dataflow traces collection (#1632). * format --- infra/base-images/base-runner/collect_dft | 6 ++++-- infra/gcb/build_project.py | 11 +++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/infra/base-images/base-runner/collect_dft b/infra/base-images/base-runner/collect_dft index e316c0dbf..81b868859 100755 --- a/infra/base-images/base-runner/collect_dft +++ b/infra/base-images/base-runner/collect_dft @@ -23,7 +23,9 @@ else fi # Timeout for running a single fuzz target. -TIMEOUT=1h +if [ -z "$COLLECT_DFT_TIMEOUT"]; then + COLLECT_DFT_TIMEOUT=1h +fi # Number of CPUs available, this is needed for running targets in parallel. NPROC=$(nproc) @@ -38,7 +40,7 @@ function run_one_target { rm -rf $traces && mkdir -p $traces - timeout $TIMEOUT dataflow_tracer.py $OUT/$target $corpus $traces &> $log + timeout $COLLECT_DFT_TIMEOUT dataflow_tracer.py $OUT/$target $corpus $traces &> $log if (( $? != 0 )); then echo "Error occured while collecting data flow traces for $target:" cat $log diff --git a/infra/gcb/build_project.py b/infra/gcb/build_project.py index cb5048d8c..06eb6b384 100644 --- a/infra/gcb/build_project.py +++ b/infra/gcb/build_project.py @@ -356,8 +356,15 @@ def dataflow_post_build_steps(project_name, env): return None steps.append({ - 'name': 'gcr.io/oss-fuzz-base/base-runner', - 'env': env, + 'name': + 'gcr.io/oss-fuzz-base/base-runner', + 'env': + env + [ + 'COLLECT_DFT_TIMEOUT=2h', + 'DFT_FILE_SIZE_LIMIT=65535', + 'DFT_MIN_TIMEOUT=2.0', + 'DFT_TIMEOUT_RANGE=6.0', + ], 'args': [ 'bash', '-c', ('for f in /corpus/*.zip; do unzip -q $f -d ${f%%.*}; done && '