aboutsummaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f8e3733ea..b0c0c8471 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -93,6 +93,15 @@ export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
export EDITOR
+# Add libc MALLOC and MALLOC_PERTURB test
+# only if we are not executing the test with valgrind
+expr "$GIT_TEST_OPTS" : ".*\(--valgrind\)" >/dev/null || {
+ MALLOC_CHECK_=3
+ export MALLOC_CHECK_
+ MALLOC_PERTURB_="$( expr \( $$ % 255 \) + 1)"
+ export MALLOC_PERTURB_
+}
+
# Protect ourselves from common misconfiguration to export
# CDPATH into the environment
unset CDPATH