diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-10-26 16:30:48 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-10-26 16:30:48 +0000 |
commit | 6c92b6d86aeb291da1e74fb7354582f1ab55ec82 (patch) | |
tree | 8632949d1bf27d5499a5c2bb654b240a80fab5b5 /tools/fuzz-test.sh | |
parent | c654a52e64f526fc68542bf8fac9afbdd73550d8 (diff) | |
download | wireshark-6c92b6d86aeb291da1e74fb7354582f1ab55ec82.tar.gz |
Add an option (-P) for a minimum plugin count.
svn path=/trunk/; revision=45800
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-x | tools/fuzz-test.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index 3d3258be7f..f333e0676f 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -61,9 +61,11 @@ ERR_PROB=0.02 # (There'll just be a core-dump). ###export WIRESHARK_ABORT_ON_DISSECTOR_BUG="True" +# Sanity check to make sure we can find our plugins. Zero or less disables. +MIN_PLUGINS=0 # To do: add options for file names and limits -while getopts ":2b:d:e:gC:p:" OPTCHAR ; do +while getopts ":2b:C:d:e:gp:P:" OPTCHAR ; do case $OPTCHAR in 2) TWO_PASS="-2 " ;; b) BIN_DIR=$OPTARG ;; @@ -72,6 +74,7 @@ while getopts ":2b:d:e:gC:p:" OPTCHAR ; do e) ERR_PROB=$OPTARG ;; g) VALGRIND=1 ;; p) MAX_PASSES=$OPTARG ;; + P) MIN_PLUGINS=$OPTARG ;; esac done shift $(($OPTIND - 1)) @@ -137,11 +140,10 @@ FIN exit 1 fi -DISSECTOR_PLUGINS=`$TSHARK -G plugins | grep dissector | wc -l` -# 10 is an arbritary value. -if [ $DISSECTOR_PLUGINS -lt 10 ] ; then - echo "Warning: Found fewer plugins than expected." - #exit 1 +PLUGIN_COUNT=`$TSHARK -G plugins | grep dissector | wc -l` +if [ $MIN_PLUGINS -gt 0 -a $PLUGIN_COUNT -lt $MIN_PLUGINS ] ; then + echo "Warning: Found fewer plugins than expected ($PLUGIN_COUNT vs $MIN_PLUGINS)." + exit 1 fi HOWMANY="forever" |