summaryrefslogtreecommitdiffstats
path: root/regress/valgrind-unit.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-07-11 01:56:36 +0200
committerDamien Miller <djm@mindrot.org>2018-07-11 01:57:44 +0200
commitd20720d373d8563ee737d1a45dc5e0804d622dbc (patch)
tree187b54db40342d9960acecd9e47089444ff7b227 /regress/valgrind-unit.sh
parentSupply missing "int r" in skey code. (diff)
downloadopenssh-d20720d373d8563ee737d1a45dc5e0804d622dbc.tar.xz
openssh-d20720d373d8563ee737d1a45dc5e0804d622dbc.zip
disable valgrind memleak checking by default
Add VALGRIND_CHECK_LEAKS knob to turn it back on.
Diffstat (limited to 'regress/valgrind-unit.sh')
-rwxr-xr-xregress/valgrind-unit.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/regress/valgrind-unit.sh b/regress/valgrind-unit.sh
index 433cb069a..c353c2cbc 100755
--- a/regress/valgrind-unit.sh
+++ b/regress/valgrind-unit.sh
@@ -8,9 +8,13 @@ test "x$OBJ" = "x" && OBJ=$PWD
# This mostly replicates the logic in test-exec.sh for running the
# regress tests under valgrind.
+VG_LEAK="--leak-check=no"
+if [ x"$VALGRIND_CHECK_LEAKS" = "x" ]; then
+ VG_LEAK="--leak-check=full"
+fi
VG_TEST=`basename $UNIT_BINARY`
VG_LOG="$OBJ/valgrind-out/${VG_TEST}.%p"
-VG_OPTS="--track-origins=yes --leak-check=full --log-file=${VG_LOG}"
+VG_OPTS="--track-origins=yes $VG_LEAK --log-file=${VG_LOG}"
VG_OPTS="$VG_OPTS --trace-children=yes"
VG_PATH="valgrind"
if [ "x$VALGRIND_PATH" != "x" ]; then