diff options
author | Dmitriy Nikiforov <d.nikiforov@partner.samsung.com> | 2017-08-30 19:12:47 +0300 |
---|---|---|
committer | Dmitriy Nikiforov <d.nikiforov@partner.samsung.com> | 2017-09-05 21:51:25 +0300 |
commit | c32b3842832929bc2664f6aeaf6d4f72405444ab (patch) | |
tree | a0c1319af02fc5b894ef310d3874b68fb2998ca5 /infra/commands | |
parent | d56b03e92ddf43e6c94671c444cf68258396776c (diff) | |
download | fuzz-testing-c32b3842832929bc2664f6aeaf6d4f72405444ab.tar.gz fuzz-testing-c32b3842832929bc2664f6aeaf6d4f72405444ab.tar.bz2 fuzz-testing-c32b3842832929bc2664f6aeaf6d4f72405444ab.zip |
Reduce the number of jobs for '--test-input' option to 1 job
There is no need to test one input multiple times.
Change-Id: I69ecfe78a8566357f803d8da8066ce1e36829eb6
Diffstat (limited to 'infra/commands')
-rwxr-xr-x | infra/commands/run.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/infra/commands/run.sh b/infra/commands/run.sh index 8f3be8a..a370ba4 100755 --- a/infra/commands/run.sh +++ b/infra/commands/run.sh @@ -118,6 +118,7 @@ generated_corpus_dir="${target_dir}/generated_corpus" logs_dir="${target_dir}/logs" artifacts_dir="${target_dir}/artifacts" coverage_dir="${target_dir}/coverage" +fuzzer_inputs=("${generated_corpus_dir}" "${seed_corpus_dir}") LIBFUZZER_OPTS[artifact_prefix]="${artifacts_dir}/" ASAN_OPTS[log_path]="${logs_dir}/asan.log" @@ -153,6 +154,15 @@ if [[ -n ${options} ]]; then done fi +if [[ -f ${TEST_INPUT} ]]; then + # push test input + ${SDB_CMD} push "${TEST_INPUT}" "/tmp" >/dev/null + fuzzer_inputs=("/tmp/$(basename ${TEST_INPUT})") + + # no need to do create multiple jobs for one input + LIBFUZZER_OPTS[jobs]=1 +fi + if (( DUMP_COVERAGE == 1 )); then ASAN_OPTS[detect_leaks]=0 fi @@ -192,12 +202,6 @@ fi sdb_shell rm -rf "${exec_dir}" '||' true sdb_shell mkdir -p "${exec_dir}" -fuzzer_inputs=("${generated_corpus_dir}" "${seed_corpus_dir}") -if [[ -f ${TEST_INPUT} ]]; then - ${SDB_CMD} push "${TEST_INPUT}" "/tmp" >/dev/null - fuzzer_inputs=("/tmp/$(basename ${TEST_INPUT})") -fi - # run fuzzer echo "${SDB_CMD} ${target_bin} \${LIBFUZZER_OPTIONS} ${fuzzer_inputs[*]}" ${SDB_CMD} shell cd "${exec_dir}" '&&' \ |