[test suite] switch SPA packets test to use afl-cmin test cases

This commit is contained in:
Michael Rash 2015-03-19 22:48:11 -04:00
parent 89d7241a51
commit 104aeca978
9 changed files with 20 additions and 4 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh -x
TEST_CASES_DIR=test-cases
LD_LIBRARY_PATH=../../lib/.libs afl-cmin -i $TEST_CASES_DIR/spa-pkts -o $TEST_CASES_DIR/spa-pkts.cmin ../../server/.libs/fwknopd -c ../conf/default_fwknopd.conf -a ../conf/default_access.conf -A -f -t
exit $?

View File

@ -1,7 +1,10 @@
#!/bin/sh -x
SPA_PKT="1716411011200157:root:1397329899:2.0.1:1:127.0.0.2,tcp/22:AAAAA"
IN_DIR="test-cases/spa-pkts.cmin"
echo -n $SPA_PKT | LD_LIBRARY_PATH=../../lib/.libs ../../server/.libs/fwknopd -c ../conf/default_fwknopd.conf -a ../conf/default_access.conf -A -f -t
for spa_pkt_file in $IN_DIR/*
do
cat $spa_pkt_file | LD_LIBRARY_PATH=../../lib/.libs ../../server/.libs/fwknopd -c ../conf/default_fwknopd.conf -a ../conf/default_access.conf -A -f -t || exit $?
done
exit $?
exit 0

View File

@ -9,7 +9,7 @@
FDIR="spa-pkts.out"
OUT_DIR="$TOP_DIR/$FDIR"
PREV_OUT_DIR=''
IN_DIR="test-cases/spa-pkts"
IN_DIR="test-cases/spa-pkts.cmin"
### build up our afl-fuzz text banner
TSTR="fwknopd,SPA,encode/decode"

View File

@ -0,0 +1 @@
1716411011200157:root:1397329899:2.0.1:1:127.0.0.2,tcp/22:AAAAAAAAAAAAAAAAAAAAAA

View File

@ -0,0 +1 @@
1716411011200157:root:1397329899:2.0.1:1:127.0.0.2,tcp/22:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

View File

@ -0,0 +1 @@
1716411011200157:root:1397329899:2.0.1:1:127.0.0.2,tcp/22:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

View File

@ -0,0 +1 @@
3145808919615481:root:1397329899:2.0.1:0:127.0.0.2,echo fwknoptest > /tmp/fwknoptest:AAAAAAAAAAAAAAAAAAAAAA

View File

@ -0,0 +1 @@
3145808919615481:root:1397329899:2.0.1:0:127.0.0.2,echo fwknoptest > /tmp/fwknoptest:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

View File

@ -0,0 +1 @@
1716411011200157:root:1397329899:2.0.1:4:127.0.0.2,tcp/22:192.168.10.1,12345:1234:AAAAAAAAAAAAAAAAAAAAAA