]> git.ipfire.org Git - thirdparty/git.git/commitdiff
leak tests: mark various "generic" tests as passing with SANITIZE=leak
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 12 Oct 2021 13:56:44 +0000 (15:56 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2021 01:23:24 +0000 (18:23 -0700)
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>
14 files changed:
t/t1430-bad-ref-name.sh
t/t1504-ceiling-dirs.sh
t/t1510-repo-setup.sh
t/t2050-git-dir-relative.sh
t/t2300-cd-to-toplevel.sh
t/t3070-wildmatch.sh
t/t3205-branch-color.sh
t/t3211-peel-ref.sh
t/t3300-funny-names.sh
t/t3902-quoted.sh
t/t4026-color.sh
t/t5580-unc-paths.sh
t/t5615-alternate-env.sh
t/t7518-ident-corner-cases.sh

index b1839e08771d4162db11f2b6b6eabd33da10b275..90b7b350a53ccd8a07c5ee791d5980a4d1eb2bee 100755 (executable)
@@ -4,6 +4,7 @@ test_description='Test handling of ref names that check-ref-format rejects'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 3d51615e42d53a0c7794533eb27049606981fbf3..0fafcf9dde385f2c2bac7fbd846098908a72f09b 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test GIT_CEILING_DIRECTORIES'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_prefix() {
index bbfe05b8e4a5c4c13e531647bfa460c0a552de2e..591505a39c02786962a02161d533f28dca16951e 100755 (executable)
@@ -43,6 +43,7 @@ A few rules for repo setup:
 # This test heavily relies on the standard error of nested function calls.
 test_untraceable=UnfortunatelyYes
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 here=$(pwd)
index 21f4659a9d1c22fcc8c9eb3261315d67988dad2f..1f193cde965303a8f2362e824e0a86e99f746548 100755 (executable)
@@ -12,6 +12,7 @@ into the subdir while keeping the worktree location,
 and tries commits from the top and the subdir, checking
 that the commit-hook still gets called.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 COMMIT_FILE="$(pwd)/output"
index c8de6d8a1902209ef98ec0832296ed9060310429..b40eeb263fe896a9553ef93f82e8a78b1dc2fb60 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='cd_to_toplevel'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 EXEC_PATH="$(git --exec-path)"
index 56ea4bda133d7443ba0d67c082d157cd491bd9cf..72d5b014d82c6c3fbdbf693a791e8599138594c0 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='wildmatch tests'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Disable expensive chain-lint tests; all of the tests in this script
index 08bd906173bd6f1c45103ee69608472a0631064d..6a521c1a3e5225716c14656aa9230afaf5a7829d 100755 (executable)
@@ -4,6 +4,7 @@ test_description='basic branch output coloring'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'set up some sample branches' '
index 37b9d26f4b6ba88396a2aaaecd4675470cfaa581..9cbc34fc5838b4d4a886135352e92d613ca8146a 100755 (executable)
@@ -4,6 +4,7 @@ test_description='tests for the peel_ref optimization of packed-refs'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create annotated tag in refs/tags' '
index f5bf16abcd8ce2aae5929129913cbb8927b06539..d3ac826283e1a16315bb158754224067d5b0afe4 100755 (executable)
@@ -9,6 +9,7 @@ This test tries pathnames with funny characters in the working
 tree, index, and tree objects.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 HT='   '
index f528008c363c68f40da3b88a34ae8ec931d0c1ac..72a5a565e973ad634ecfa4418d8934d3c7b85ae1 100755 (executable)
@@ -5,6 +5,7 @@
 
 test_description='quoted output'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 FN='濱野'
index c0b642c1ab03f27dabc58e3b99ba9f8f48bf35d8..cc73161b466b56615e969685f874130af951ddfd 100755 (executable)
@@ -4,6 +4,8 @@
 #
 
 test_description='Test diff/status color escape codes'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ESC=$(printf '\033')
index cd803ae8bf1abd47e691004e34149a059b8d611b..cd7604fff93a55ff9bb9e4bcae905c4386f0374a 100755 (executable)
@@ -4,6 +4,7 @@ test_description='various Windows-only path tests'
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if test_have_prereq CYGWIN
index b4905b822c07048ddfbc43cfd39265bd2116f197..83513e46a3556baa014c76f613a4da5504b8b548 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='handling of alternates in environment variables'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_obj () {
index 905957bd0a1681265f6064a65b319c1c3fa95484..fffdb6ff2e751d2441e8f805c475a044bfdd0920 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='corner cases in ident strings'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # confirm that we do not segfault _and_ that we do not say "(null)", as