]> git.ipfire.org Git - thirdparty/git.git/commitdiff
leak tests: mark some diff tests as passing with SANITIZE=leak
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2021 22:24:19 +0000 (00:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Nov 2021 18:23:08 +0000 (11:23 -0700)
Mark some tests that match "*diff*" as passing when git is compiled
with SANITIZE=leak. They'll now be listed as running under the
"GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
target).

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
25 files changed:
t/t4000-diff-format.sh
t/t4003-diff-rename-1.sh
t/t4004-diff-rename-symlink.sh
t/t4005-diff-rename-2.sh
t/t4006-diff-mode.sh
t/t4009-diff-rename-4.sh
t/t4010-diff-pathspec.sh
t/t4011-diff-symlink.sh
t/t4012-diff-binary.sh
t/t4020-diff-external.sh
t/t4024-diff-optimize-common.sh
t/t4027-diff-submodule.sh
t/t4029-diff-trailing-space.sh
t/t4032-diff-inter-hunk-context.sh
t/t4033-diff-patience.sh
t/t4034-diff-words.sh
t/t4035-diff-quiet.sh
t/t4037-diff-r-t-dirs.sh
t/t4040-whitespace-status.sh
t/t4046-diff-unmerged.sh
t/t4049-diff-stat-count.sh
t/t4050-diff-histogram.sh
t/t4054-diff-bogus-tree.sh
t/t4062-diff-pickaxe.sh
t/t4063-diff-blobs.sh

index cce334981e19ea9b38a4ae204531c66bb8a57dc3..bfcaae390f3ad95584ce9cf78b62cc81c33adf67 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='Test built-in diff output engine.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
index f4485a87c6317c98d82a6af4014520d9e55ee73d..181e9683a7955e18fcd149cd179c58c9f28d940a 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='More rename detection
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
index 3d495e37bb1916741be13afb7664c56b465a7310..8def4d4aee9d2f2b39469fd550020fedab1d0ee7 100755 (executable)
@@ -9,6 +9,8 @@ The rename detection logic should be able to detect pure rename or
 copy of symbolic links, but should not produce rename/copy followed
 by an edit for them.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
index 6f1b323f979a42d663959986e3949f216c1c7669..5c756dc24358cfe28219d2097b96f3655a9e13f0 100755 (executable)
@@ -5,6 +5,8 @@
 
 test_description='Same rename detection as t4003 but testing diff-raw.'
 
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
index 6cdee2a2164d0bc7b3ce8105dc733388afb15b35..dbd4c0da213eb441bdd0ffb6d87748ce1e0de17c 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='Test mode change diffs.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 sed_script='s/\(:100644 100755\) \('"$OID_REGEX"'\) \2 /\1 X X /'
index 59b7f44f0585796ddfd99951bdf23a4eab9fa259..3480781dabf30aca2a01c40a1ab34eb1e075eccc 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='Same rename detection as t4003 but testing diff-raw -z.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
index 1bbced79ece861e2329663b09e8aead3daa983e0..9d9650eba7e9774963b941fe8ebf82925af14ec9 100755 (executable)
@@ -9,6 +9,8 @@ Prepare:
         file0
         path1/file1
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
 
index 5a25c259fe333912ba1614c2e645e03e5bdd6e02..d7a5f7ae780c0319514fd949dacac98cfe6ce23b 100755 (executable)
@@ -6,6 +6,8 @@
 test_description='Test diff of symlinks.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
index 33ff588ebca03807da91c4a786df76c03fb9bff7..00eeafb2ace57226bcec1cae6deb24f111d80ef2 100755 (executable)
@@ -6,6 +6,7 @@
 test_description='Binary diff and apply
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect.binary-numstat <<\EOF
index e009826fcbe5a893df748a47d162e010b95d758b..54bb8ef27e7f0089a46ca48ecccf3998deb84a69 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='external diff interface test'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 6b44ce14933f8ceaa7e5e93eb9eaa0ff2527b66c..540f93715e4efd2b9293c81a0dd9700e482a77ed 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='common tail optimization'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 z=zzzzzzzz ;# 8
index 94ef77e1dfedc28656d78c80b689eca6806a7b0c..6cef0da982faa1fbb86696ca0275eb49c8224090 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='difference in submodules'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
index 32b6e9a4e76217d8de771b405dd3ce57c73643ad..5f8ffef74b6474c9fb97e18cd6c48d449fa26734 100755 (executable)
@@ -4,6 +4,7 @@
 #
 test_description='diff honors config option, diff.suppressBlankEmpty'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat <<\EOF >expected ||
index bada0cbd32f76418a76702fbbd5143004876d074..7db92d0d9f461aca48fb4ebf014cd03cb1401a1c 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='diff hunk fusing'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 f() {
index 113304dc596034ff9bfaac65b2ff896b6a181dca..f7be7f5ef0139b8384746518c676d80cb88dd5dd 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='patience diff algorithm'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
index 561c582d161551147d8e4805aa35ba4178285833..d5abcf4b4c6fa9f828b635dccbea37eae3ed4eb7 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='word diff colors'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff.sh
 
index 0352bf81a90a38adf14fb7a980c98600e1f650b2..76f8034c60fabe2cbd1ea45610e1ce3137755b0d 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='Return value of diffs'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index f5ce3b29a2ac753470b51bb494ca3836ffc21b11..b5f96fe23bd214f15ac66c1cac0291cfb1b73e58 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='diff -r -t shows directory additions and deletions'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 3c728a3ebf9ce52e5c24c81525d5cb749cfb2957..e70e020ae9349c378b4b922933668932e95acc8d 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='diff --exit-code with whitespace'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index ff7cfd884a44ebe0844c7ac6a21f25ed8374e7d4..fd3f3a7260b68b09ca7714f7a805cee81eb4869f 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='diff with unmerged index entries'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index 53061b104ecc1af2eebb9d79fa2af5655236471d..f5b35e7860ea4910288bc8513449b1cc1ec96c79 100755 (executable)
@@ -2,6 +2,8 @@
 # Copyright (c) 2011, Google Inc.
 
 test_description='diff --stat-count'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
index fd3e86a74f3d92d837e2557236776400687f7a5d..c61b30f96daf57a9c7f3185bdd8ea3c4aeb9dbe3 100755 (executable)
@@ -2,6 +2,7 @@
 
 test_description='histogram diff algorithm'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-diff-alternative.sh
 
index 8c95f152b23b242df5f5aaa0b5b25e6e1826f753..294fb5531372d597a5a551b40e66437d7599e766 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test diff with a bogus tree containing the null sha1'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create bogus tree' '
index 1130c8019b4c14975744f31f360886ffb4c3f14c..9aaa068ed9bc9a7853ce8331ec5d66107a50b94b 100755 (executable)
@@ -5,6 +5,7 @@
 
 test_description='Pickaxe options'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
index bc69e26c524b7cc099aebad7729039a45bedc398..7e6c9d638433caca632d0d6d6dbdbc8c1bd98ec8 100755 (executable)
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test direct comparison of blobs via git-diff'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 run_diff () {