aboutsummaryrefslogtreecommitdiff
path: root/t/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 't/valgrind')
-rw-r--r--t/valgrind/.gitignore2
-rw-r--r--t/valgrind/default.supp21
-rwxr-xr-xt/valgrind/valgrind.sh13
3 files changed, 36 insertions, 0 deletions
diff --git a/t/valgrind/.gitignore b/t/valgrind/.gitignore
new file mode 100644
index 000000000..d4ae6676d
--- /dev/null
+++ b/t/valgrind/.gitignore
@@ -0,0 +1,2 @@
+/bin/
+/templates
diff --git a/t/valgrind/default.supp b/t/valgrind/default.supp
new file mode 100644
index 000000000..2482b3b06
--- /dev/null
+++ b/t/valgrind/default.supp
@@ -0,0 +1,21 @@
+{
+ ignore-zlib-errors-cond
+ Memcheck:Cond
+ obj:*libz.so*
+}
+
+{
+ ignore-zlib-errors-value4
+ Memcheck:Value4
+ obj:*libz.so*
+}
+
+{
+ writing-data-from-zlib-triggers-errors
+ Memcheck:Param
+ write(buf)
+ obj:/lib/ld-*.so
+ fun:write_in_full
+ fun:write_buffer
+ fun:write_loose_object
+}
diff --git a/t/valgrind/valgrind.sh b/t/valgrind/valgrind.sh
new file mode 100755
index 000000000..dc9261265
--- /dev/null
+++ b/t/valgrind/valgrind.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+base=$(basename "$0")
+
+exec valgrind -q --error-exitcode=126 \
+ --leak-check=no \
+ --suppressions="$GIT_VALGRIND/default.supp" \
+ --gen-suppressions=all \
+ --track-origins=yes \
+ --log-fd=4 \
+ --input-fd=4 \
+ $GIT_VALGRIND_OPTIONS \
+ "$GIT_VALGRIND"/../../"$base" "$@"