diff options
author | Evan Huus <eapache@gmail.com> | 2013-08-11 17:48:49 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-08-11 17:48:49 +0000 |
commit | f9834195edb78211c5cb5e281b49929bec6fc29e (patch) | |
tree | fae69f1deea77a7f1ad0525a7d36813d07cb064a /tools | |
parent | 36ff6f2c25840f520a012baf2cb69b47f2ba1984 (diff) |
Don't let a valgrind-output-parsing error hide the fact that it was an error of
some sort: if we don't recognize valgrind's output then something somewhere went
wrong and we should be informed.
svn path=/trunk/; revision=51300
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/fuzz-test.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/fuzz-test.sh b/tools/fuzz-test.sh index 6916d3cbf8..bc876d9bdf 100755 --- a/tools/fuzz-test.sh +++ b/tools/fuzz-test.sh @@ -212,7 +212,10 @@ while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do VG_ERR_CNT=`grep "ERROR SUMMARY:" $TMP_DIR/$ERR_FILE | cut -f4 -d' '` VG_DEF_LEAKED=`grep "definitely lost:" $TMP_DIR/$ERR_FILE | cut -f7 -d' ' | tr -d ,` VG_IND_LEAKED=`grep "indirectly lost:" $TMP_DIR/$ERR_FILE | cut -f7 -d' ' | tr -d ,` - if [ "`expr $VG_DEF_LEAKED + $VG_IND_LEAKED`" -gt "$MAX_LEAK" ] ; then + VG_TOTAL_LEAKED=`expr $VG_DEF_LEAKED + $VG_IND_LEAKED` + if [ $? -ne 0 ] ; then + VG_ERR_CNT=1 + elif [ "$VG_TOTAL_LEAKED" -gt "$MAX_LEAK" ] ; then VG_ERR_CNT=1 fi if grep -q "Valgrind cannot continue" $TMP_DIR/$ERR_FILE; then |