]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
disable valgrind memleak checking by default
authorDamien Miller <djm@mindrot.org>
Tue, 10 Jul 2018 23:56:36 +0000 (09:56 +1000)
committerDamien Miller <djm@mindrot.org>
Tue, 10 Jul 2018 23:57:44 +0000 (09:57 +1000)
Add VALGRIND_CHECK_LEAKS knob to turn it back on.

regress/test-exec.sh
regress/valgrind-unit.sh

index a314a57b4ebef7ea2f25e6fde810bcc5b92b8def..ed235cfafa9033a17eab6669d40609a5dba32d17 100644 (file)
@@ -163,9 +163,13 @@ if [ "x$USE_VALGRIND" != "x" ]; then
        esac
 
        if [ x"$VG_SKIP" = "x" ]; then
+               VG_LEAK="--leak-check=no"
+               if [ x"$VALGRIND_CHECK_LEAKS" = "x" ]; then
+                       VG_LEAK="--leak-check=full"
+               fi
                VG_IGNORE="/bin/*,/sbin/*,/usr/*,/var/*"
                VG_LOG="$OBJ/valgrind-out/${VG_TEST}."
-               VG_OPTS="--track-origins=yes --leak-check=full"
+               VG_OPTS="--track-origins=yes $VG_LEAK"
                VG_OPTS="$VG_OPTS --trace-children=yes"
                VG_OPTS="$VG_OPTS --trace-children-skip=${VG_IGNORE}"
                VG_PATH="valgrind"
index 433cb069a75a39f73f9222a5286823f6308979e4..c353c2cbce88dfaab44d3825daafff013adf4186 100755 (executable)
@@ -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