aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/minimize.sh
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-16 10:24:36 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-30 08:37:24 -0500
commit83e9918107dba1b969a226b79e1d37a852339e45 (patch)
tree64704299bd8ff1b8c4b185f011d12773565c1828 /src/test/fuzz/minimize.sh
parent301eff0e90a727005d364ebc2e9a7ffaecd0a3ef (diff)
downloadtor-83e9918107dba1b969a226b79e1d37a852339e45.tar.gz
tor-83e9918107dba1b969a226b79e1d37a852339e45.zip
Tools for working with directories of fuzzed stuff.
Diffstat (limited to 'src/test/fuzz/minimize.sh')
-rwxr-xr-xsrc/test/fuzz/minimize.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/fuzz/minimize.sh b/src/test/fuzz/minimize.sh
new file mode 100755
index 0000000000..87d3dda13c
--- /dev/null
+++ b/src/test/fuzz/minimize.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+if [ ! -d "$1" ] ; then
+ echo "I need a directory"
+ exit 1
+fi
+
+which=`basename "$1"`
+
+mkdir "$1.out"
+afl-cmin -i "$1" -o "$1.out" -m none "./src/test/fuzz/fuzz-${which}"
+