leak tests: mark various "generic" tests as passing with SANITIZE=leak

Mark various "generic" tests as passing when git is compiled with SANITIZE=leak. These tests were subjectively picked from the lists of passing tests since they're all small, and test some generic feature such as wildmatch(), commonly used environment variables, ident parsing etc. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Oct 12, 2021 at 15:56 UTC 288a480621656981d5ad1f1e0af438b769821ab3
14 files changed +18
t/t1430-bad-ref-name.sh
+1
@@ -4,6 +4,7 @@ test_description='Test handling of ref names that check-ref-format rejects'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success setup '
t/t1504-ceiling-dirs.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='test GIT_CEILING_DIRECTORIES'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 test_prefix() {
t/t1510-repo-setup.sh
+1
@@ -43,6 +43,7 @@ A few rules for repo setup:
43 # This test heavily relies on the standard error of nested function calls.
44 test_untraceable=UnfortunatelyYes
45
46 +TEST_PASSES_SANITIZE_LEAK=true
47 . ./test-lib.sh
48
49 here=$(pwd)
t/t2050-git-dir-relative.sh
+1
@@ -12,6 +12,7 @@ into the subdir while keeping the worktree location,
12 and tries commits from the top and the subdir, checking
13 that the commit-hook still gets called.'
14
15 +TEST_PASSES_SANITIZE_LEAK=true
16 . ./test-lib.sh
17
18 COMMIT_FILE="$(pwd)/output"
t/t2300-cd-to-toplevel.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='cd_to_toplevel'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 EXEC_PATH="$(git --exec-path)"
t/t3070-wildmatch.sh
+1
@@ -2,6 +2,7 @@
2
3 test_description='wildmatch tests'
4
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 # Disable expensive chain-lint tests; all of the tests in this script
t/t3205-branch-color.sh
+1
@@ -4,6 +4,7 @@ test_description='basic branch output coloring'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success 'set up some sample branches' '
t/t3211-peel-ref.sh
+1
@@ -4,6 +4,7 @@ test_description='tests for the peel_ref optimization of packed-refs'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 test_expect_success 'create annotated tag in refs/tags' '
t/t3300-funny-names.sh
+1
@@ -9,6 +9,7 @@ This test tries pathnames with funny characters in the working
9 tree, index, and tree objects.
10 '
11
12 +TEST_PASSES_SANITIZE_LEAK=true
13 . ./test-lib.sh
14
15 HT=' '
t/t3902-quoted.sh
+1
@@ -5,6 +5,7 @@
5
6 test_description='quoted output'
7
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 FN='濱野'
t/t4026-color.sh
+2
@@ -4,6 +4,8 @@
4 #
5
6 test_description='Test diff/status color escape codes'
7 +
8 +TEST_PASSES_SANITIZE_LEAK=true
9 . ./test-lib.sh
10
11 ESC=$(printf '\033')
t/t5580-unc-paths.sh
+1
@@ -4,6 +4,7 @@ test_description='various Windows-only path tests'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
6
7 +TEST_PASSES_SANITIZE_LEAK=true
8 . ./test-lib.sh
9
10 if test_have_prereq CYGWIN
t/t5615-alternate-env.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='handling of alternates in environment variables'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 check_obj () {
t/t7518-ident-corner-cases.sh
+2
@@ -1,6 +1,8 @@
1 #!/bin/sh
2
3 test_description='corner cases in ident strings'
4 +
5 +TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
7
8 # confirm that we do not segfault _and_ that we do not say "(null)", as