summaryrefslogtreecommitdiff
path: root/tools/fuzz-test.sh
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2016-08-23 16:55:16 -0700
committerGerald Combs <gerald@wireshark.org>2016-08-24 17:11:31 +0000
commitc2b98004df95390155d45881306224a1ebe1792f (patch)
treeffefe5708339b454025993db797f1b22394c214a /tools/fuzz-test.sh
parent88b9b750f5e00c6eb6d75c72fc107fd1d7427744 (diff)
downloadwireshark-c2b98004df95390155d45881306224a1ebe1792f.tar.gz
Fuzz test: Make Valgrind error detection more verbose.
When we set VG_ERR_CNT=1 print the reason. Change-Id: Icb8f2a1e7074044521873b116fc891cc4be4b204 Reviewed-on: https://code.wireshark.org/review/17287 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'tools/fuzz-test.sh')
-rwxr-xr-xtools/fuzz-test.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh
index 6336dac3ea..f39138cc19 100755
--- a/tools/fuzz-test.sh
+++ b/tools/fuzz-test.sh
@@ -244,11 +244,14 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do
VG_IND_LEAKED=`grep "indirectly lost:" $TMP_DIR/$ERR_FILE | cut -f7 -d' ' | tr -d ,`
VG_TOTAL_LEAKED=`expr $VG_DEF_LEAKED + $VG_IND_LEAKED`
if [ $? -ne 0 ] ; then
+ echo "General Valgrind failure."
VG_ERR_CNT=1
elif [ "$VG_TOTAL_LEAKED" -gt "$MAX_LEAK" ] ; then
+ echo "Definitely + indirectly ($VG_DEF_LEAKED + $VG_IND_LEAKED) exceeds max ($MAX_LEAK)."
VG_ERR_CNT=1
fi
if grep -q "Valgrind cannot continue" $TMP_DIR/$ERR_FILE; then
+ echo "Valgrind unable to continue."
VG_ERR_CNT=-1
fi
fi