From d68a23644eb3cb7bc6d665ff44d9f83762c56f52 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Thu, 16 Feb 2017 21:43:31 -0800 Subject: [PATCH] Fix test_report for AFL. --- infra/base-images/base-runner/test_report | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/infra/base-images/base-runner/test_report b/infra/base-images/base-runner/test_report index 7024b5d8e..f5a63f21c 100755 --- a/infra/base-images/base-runner/test_report +++ b/infra/base-images/base-runner/test_report @@ -27,13 +27,22 @@ for FUZZER_BINARY in $(find $OUT/ -executable -type f); do continue fi - N=$[$N+1] FUZZER=$(basename $FUZZER_BINARY) + if echo "$FUZZER" | grep "^afl-" > /dev/null 2>&1; then + continue + fi + + N=$[$N+1] echo "testing $FUZZER" # run fuzzer. FUZZER_STDOUT=$(tempfile) - run_fuzzer $FUZZER -max_total_time=20 |& tee $FUZZER_STDOUT + if [[ "$FUZZING_ENGINE" = libfuzzer ]]; then + run_fuzzer $FUZZER -max_total_time=20 |& tee $FUZZER_STDOUT + else + export AFL_NO_UI=1 + timeout --preserve-status -s INT 20s run_fuzzer $FUZZER |& tee $FUZZER_STDOUT + fi FUZZER_STATUS=${PIPESTATUS[0]} FAILURES=0