aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:21 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:22 -0800
commit097c28db78db288c8087a515d3454f9c83911874 (patch)
tree741bab36fc8f658fb038a2ac31ea928dfaff5459
parentc5887af55db647be1cfe9989e9539a8f0ff07f1b (diff)
parent03f72a4ed8b0d9f379db80749150a13b3ad1f2cd (diff)
downloadgit-097c28db78db288c8087a515d3454f9c83911874.tar.gz
Merge branch 'rj/test-with-leak-check'
More tests that are supposed to pass leak sanitizer are marked as such. * rj/test-with-leak-check: t0080: mark as leak-free test-lib: check for TEST_PASSES_SANITIZE_LEAK t6113: mark as leak-free t5332: mark as leak-free
-rwxr-xr-xt/t0080-unit-test-output.sh1
-rwxr-xr-xt/t5332-multi-pack-reuse.sh1
-rwxr-xr-xt/t6113-rev-list-bitmap-filters.sh3
-rw-r--r--t/test-lib.sh5
4 files changed, 9 insertions, 1 deletions
diff --git a/t/t0080-unit-test-output.sh b/t/t0080-unit-test-output.sh
index 961b54b06c..6657c114a3 100755
--- a/t/t0080-unit-test-output.sh
+++ b/t/t0080-unit-test-output.sh
@@ -2,6 +2,7 @@
test_description='Test the output of the unit test framework'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success 'TAP output from unit tests' '
diff --git a/t/t5332-multi-pack-reuse.sh b/t/t5332-multi-pack-reuse.sh
index 2ba788b042..99145327a6 100755
--- a/t/t5332-multi-pack-reuse.sh
+++ b/t/t5332-multi-pack-reuse.sh
@@ -2,6 +2,7 @@
test_description='pack-objects multi-pack reuse'
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-bitmap.sh
diff --git a/t/t6113-rev-list-bitmap-filters.sh b/t/t6113-rev-list-bitmap-filters.sh
index 459f0d7412..a9656a1ec8 100755
--- a/t/t6113-rev-list-bitmap-filters.sh
+++ b/t/t6113-rev-list-bitmap-filters.sh
@@ -1,10 +1,11 @@
#!/bin/sh
test_description='rev-list combining bitmaps and filters'
+
+TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-bitmap.sh
-TEST_PASSES_SANITIZE_LEAK=true
test_expect_success 'set up bitmapped repo' '
# one commit will have bitmaps, the other will not
diff --git a/t/test-lib.sh b/t/test-lib.sh
index fc93aa57e6..042f557a6f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1297,6 +1297,11 @@ test_done () {
EOF
fi
+ if test -z "$passes_sanitize_leak" && test_bool_env TEST_PASSES_SANITIZE_LEAK false
+ then
+ BAIL_OUT "Please, set TEST_PASSES_SANITIZE_LEAK before sourcing test-lib.sh"
+ fi
+
if test "$test_fixed" != 0
then
say_color error "# $test_fixed known breakage(s) vanished; please update test(s)"