From 44fa14c0e28ac26a551169d5621648db9bc08da9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 14 Dec 2016 08:12:41 -0500 Subject: Try to tweak fuzzing.md to correspond to my changes --- src/test/fuzz/fuzz_multi.sh | 34 ++++++++++++++++++++++++++++++++++ src/test/fuzz_multi.sh | 34 ---------------------------------- 2 files changed, 34 insertions(+), 34 deletions(-) create mode 100755 src/test/fuzz/fuzz_multi.sh delete mode 100755 src/test/fuzz_multi.sh (limited to 'src') diff --git a/src/test/fuzz/fuzz_multi.sh b/src/test/fuzz/fuzz_multi.sh new file mode 100755 index 0000000000..b4a17ed8cb --- /dev/null +++ b/src/test/fuzz/fuzz_multi.sh @@ -0,0 +1,34 @@ +MEMLIMIT_BYTES=21990500990976 + +N_CPUS=1 +if [ $# -ge 1 ]; then + N_CPUS="$1" + shift +fi + +FILTER=echo + +for i in `seq -w "$N_CPUS"`; do + if [ "$i" -eq 1 ]; then + if [ "$N_CPUS" -eq 1 ]; then + INSTANCE="" + NUMBER="" + else + INSTANCE="-M" + NUMBER="$i" + fi + else + INSTANCE="-S" + NUMBER="$i" + fi + # use whatever remains on the command-line to prefix the fuzzer command + # you have to copy and paste and run these commands yourself + "$FILTER" "$@" \ + ../afl/afl-fuzz \ + -i src/test/fuzz/fuzz_dir_testcase \ + -o src/test/fuzz/fuzz_dir_findings \ + -x src/test/fuzz/fuzz_dir_dictionary/fuzz_dir_http_header.dct \ + -m "$MEMLIMIT_BYTES" \ + "$INSTANCE" "$NUMBER" \ + -- src/test/fuzz_dir +done diff --git a/src/test/fuzz_multi.sh b/src/test/fuzz_multi.sh deleted file mode 100755 index b4a17ed8cb..0000000000 --- a/src/test/fuzz_multi.sh +++ /dev/null @@ -1,34 +0,0 @@ -MEMLIMIT_BYTES=21990500990976 - -N_CPUS=1 -if [ $# -ge 1 ]; then - N_CPUS="$1" - shift -fi - -FILTER=echo - -for i in `seq -w "$N_CPUS"`; do - if [ "$i" -eq 1 ]; then - if [ "$N_CPUS" -eq 1 ]; then - INSTANCE="" - NUMBER="" - else - INSTANCE="-M" - NUMBER="$i" - fi - else - INSTANCE="-S" - NUMBER="$i" - fi - # use whatever remains on the command-line to prefix the fuzzer command - # you have to copy and paste and run these commands yourself - "$FILTER" "$@" \ - ../afl/afl-fuzz \ - -i src/test/fuzz/fuzz_dir_testcase \ - -o src/test/fuzz/fuzz_dir_findings \ - -x src/test/fuzz/fuzz_dir_dictionary/fuzz_dir_http_header.dct \ - -m "$MEMLIMIT_BYTES" \ - "$INSTANCE" "$NUMBER" \ - -- src/test/fuzz_dir -done -- cgit v1.2.3-54-g00ecf