From 63a2ae92d4335468218d2444f0a4c22fa2b475d3 Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Fri, 21 Nov 2014 22:16:02 -0500 Subject: [PATCH] [test suite] added *hang.sh helper scripts for AFL results analysis --- test/afl/{ => compile}/afl-compile-code-coverage.sh | 0 test/afl/compile/afl-compile-no-enable-arg.sh | 10 ++++++++++ test/afl/{ => compile}/afl-compile.sh | 0 test/afl/{ => compile}/afl-gen-code-coverage.sh | 0 test/afl/fuzzing-wrappers/helpers/fwknop-rc-hangs.sh | 7 +++++-- .../helpers/fwknopd-parse-access-hangs.sh | 11 +++++++++++ .../helpers/fwknopd-parse-conf-hangs.sh | 11 +++++++++++ .../fuzzing-wrappers/helpers/fwknopd-stdin-hangs.sh | 11 +++++++++++ 8 files changed, 48 insertions(+), 2 deletions(-) rename test/afl/{ => compile}/afl-compile-code-coverage.sh (100%) create mode 100755 test/afl/compile/afl-compile-no-enable-arg.sh rename test/afl/{ => compile}/afl-compile.sh (100%) rename test/afl/{ => compile}/afl-gen-code-coverage.sh (100%) create mode 100755 test/afl/fuzzing-wrappers/helpers/fwknopd-parse-access-hangs.sh create mode 100755 test/afl/fuzzing-wrappers/helpers/fwknopd-parse-conf-hangs.sh create mode 100755 test/afl/fuzzing-wrappers/helpers/fwknopd-stdin-hangs.sh diff --git a/test/afl/afl-compile-code-coverage.sh b/test/afl/compile/afl-compile-code-coverage.sh similarity index 100% rename from test/afl/afl-compile-code-coverage.sh rename to test/afl/compile/afl-compile-code-coverage.sh diff --git a/test/afl/compile/afl-compile-no-enable-arg.sh b/test/afl/compile/afl-compile-no-enable-arg.sh new file mode 100755 index 00000000..5e5474fc --- /dev/null +++ b/test/afl/compile/afl-compile-no-enable-arg.sh @@ -0,0 +1,10 @@ +#!/bin/sh -x + +# this is for the fuzzing-wrappers/client-rc.sh script + +cd ../../ +CC=afl-gcc ./extras/apparmor/configure_args.sh $@ +make clean +make +cd test/afl +exit diff --git a/test/afl/afl-compile.sh b/test/afl/compile/afl-compile.sh similarity index 100% rename from test/afl/afl-compile.sh rename to test/afl/compile/afl-compile.sh diff --git a/test/afl/afl-gen-code-coverage.sh b/test/afl/compile/afl-gen-code-coverage.sh similarity index 100% rename from test/afl/afl-gen-code-coverage.sh rename to test/afl/compile/afl-gen-code-coverage.sh diff --git a/test/afl/fuzzing-wrappers/helpers/fwknop-rc-hangs.sh b/test/afl/fuzzing-wrappers/helpers/fwknop-rc-hangs.sh index 43d4e912..7faf9785 100755 --- a/test/afl/fuzzing-wrappers/helpers/fwknop-rc-hangs.sh +++ b/test/afl/fuzzing-wrappers/helpers/fwknop-rc-hangs.sh @@ -1,8 +1,11 @@ #!/bin/sh -x -for f in `find fuzzing-output/client-rc.out/hangs -name 'id*'` +HANG_DIR="fuzzing-output/client-rc.out/hangs" +HELPER_SH="fuzzing-wrappers/helpers/fwknop-rc-test.sh" + +for f in `find $HANG_DIR -name 'id*'` do - ./fuzzing-wrappers/helpers/fwknop-rc-test.sh $f + ./$HELPER_SH $f done exit diff --git a/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-access-hangs.sh b/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-access-hangs.sh new file mode 100755 index 00000000..94fa68ca --- /dev/null +++ b/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-access-hangs.sh @@ -0,0 +1,11 @@ +#!/bin/sh -x + +HANG_DIR="fuzzing-output/server-access.out/hangs" +HELPER_SH="fuzzing-wrappers/helpers/fwknopd-parse-access.sh" + +for f in `find $HANG_DIR -name 'id*'` +do + ./$HELPER_SH $f +done + +exit diff --git a/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-conf-hangs.sh b/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-conf-hangs.sh new file mode 100755 index 00000000..06f63caf --- /dev/null +++ b/test/afl/fuzzing-wrappers/helpers/fwknopd-parse-conf-hangs.sh @@ -0,0 +1,11 @@ +#!/bin/sh -x + +HANG_DIR="fuzzing-output/server-conf.out/hangs" +HELPER_SH="fuzzing-wrappers/helpers/fwknopd-parse-conf.sh" + +for f in `find $HANG_DIR -name 'id*'` +do + ./$HELPER_SH $f +done + +exit diff --git a/test/afl/fuzzing-wrappers/helpers/fwknopd-stdin-hangs.sh b/test/afl/fuzzing-wrappers/helpers/fwknopd-stdin-hangs.sh new file mode 100755 index 00000000..2ee83119 --- /dev/null +++ b/test/afl/fuzzing-wrappers/helpers/fwknopd-stdin-hangs.sh @@ -0,0 +1,11 @@ +#!/bin/sh -x + +HANG_DIR="fuzzing-output/spa-pkts.out/hangs" +HELPER_SH="fuzzing-wrappers/helpers/fwknopd-stdin-test.sh" + +for f in `find $HANG_DIR -name 'id*'` +do + ./$HELPER_SH $f +done + +exit