leak tests: mark some diff tests as passing with SANITIZE=leak
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>
Ævar Arnfjörð Bjarmason committed
Oct 31, 2021 at 00:24 UTC
16d4bd4f14e91ab5f70fb74407fc27fc4c8bfe0f
25 files changed
+38
t/t4000-diff-format.sh
+2
@@ -6,6 +6,8 @@
6
test_description='Test built-in diff output engine.
7
8
'
9
+
10
+TEST_PASSES_SANITIZE_LEAK=true
11
. ./test-lib.sh
12
. "$TEST_DIRECTORY"/lib-diff.sh
13
t/t4003-diff-rename-1.sh
+2
@@ -6,6 +6,8 @@
6
test_description='More rename detection
7
8
'
9
+
10
+TEST_PASSES_SANITIZE_LEAK=true
11
. ./test-lib.sh
12
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
13
t/t4004-diff-rename-symlink.sh
+2
@@ -9,6 +9,8 @@ The rename detection logic should be able to detect pure rename or
9
copy of symbolic links, but should not produce rename/copy followed
10
by an edit for them.
11
'
12
+
13
+TEST_PASSES_SANITIZE_LEAK=true
14
. ./test-lib.sh
15
. "$TEST_DIRECTORY"/lib-diff.sh
16
t/t4005-diff-rename-2.sh
+2
@@ -5,6 +5,8 @@
5
6
test_description='Same rename detection as t4003 but testing diff-raw.'
7
8
+
9
+TEST_PASSES_SANITIZE_LEAK=true
10
. ./test-lib.sh
11
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
12
t/t4006-diff-mode.sh
+2
@@ -6,6 +6,8 @@
6
test_description='Test mode change diffs.
7
8
'
9
+
10
+TEST_PASSES_SANITIZE_LEAK=true
11
. ./test-lib.sh
12
13
sed_script='s/\(:100644 100755\) \('"$OID_REGEX"'\) \2 /\1 X X /'
t/t4009-diff-rename-4.sh
+2
@@ -6,6 +6,8 @@
6
test_description='Same rename detection as t4003 but testing diff-raw -z.
7
8
'
9
+
10
+TEST_PASSES_SANITIZE_LEAK=true
11
. ./test-lib.sh
12
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
13
t/t4010-diff-pathspec.sh
+2
@@ -9,6 +9,8 @@ Prepare:
9
file0
10
path1/file1
11
'
12
+
13
+TEST_PASSES_SANITIZE_LEAK=true
14
. ./test-lib.sh
15
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash
16
t/t4011-diff-symlink.sh
+2
@@ -6,6 +6,8 @@
6
test_description='Test diff of symlinks.
7
8
'
9
+
10
+TEST_PASSES_SANITIZE_LEAK=true
11
. ./test-lib.sh
12
. "$TEST_DIRECTORY"/lib-diff.sh
13
t/t4012-diff-binary.sh
+1
@@ -6,6 +6,7 @@
6
test_description='Binary diff and apply
7
'
8
9
+TEST_PASSES_SANITIZE_LEAK=true
10
. ./test-lib.sh
11
12
cat >expect.binary-numstat <<\EOF
t/t4020-diff-external.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='external diff interface test'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success setup '
t/t4024-diff-optimize-common.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='common tail optimization'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
z=zzzzzzzz ;# 8
t/t4027-diff-submodule.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='difference in submodules'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
. "$TEST_DIRECTORY"/lib-diff.sh
8
t/t4029-diff-trailing-space.sh
+1
@@ -4,6 +4,7 @@
4
#
5
test_description='diff honors config option, diff.suppressBlankEmpty'
6
7
+TEST_PASSES_SANITIZE_LEAK=true
8
. ./test-lib.sh
9
10
cat <<\EOF >expected ||
t/t4032-diff-inter-hunk-context.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='diff hunk fusing'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
f() {
t/t4033-diff-patience.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='patience diff algorithm'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
. "$TEST_DIRECTORY"/lib-diff-alternative.sh
8
t/t4034-diff-words.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='word diff colors'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
. "$TEST_DIRECTORY"/lib-diff.sh
8
t/t4035-diff-quiet.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='Return value of diffs'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success 'setup' '
t/t4037-diff-r-t-dirs.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='diff -r -t shows directory additions and deletions'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success setup '
t/t4040-whitespace-status.sh
+2
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
test_description='diff --exit-code with whitespace'
4
+
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success setup '
t/t4046-diff-unmerged.sh
+2
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
test_description='diff with unmerged index entries'
4
+
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success setup '
t/t4049-diff-stat-count.sh
+2
@@ -2,6 +2,8 @@
2
# Copyright (c) 2011, Google Inc.
3
4
test_description='diff --stat-count'
5
+
6
+TEST_PASSES_SANITIZE_LEAK=true
7
. ./test-lib.sh
8
9
test_expect_success 'setup' '
t/t4050-diff-histogram.sh
+1
@@ -2,6 +2,7 @@
2
3
test_description='histogram diff algorithm'
4
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
. "$TEST_DIRECTORY"/lib-diff-alternative.sh
8
t/t4054-diff-bogus-tree.sh
+2
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
test_description='test diff with a bogus tree containing the null sha1'
4
+
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
test_expect_success 'create bogus tree' '
t/t4062-diff-pickaxe.sh
+1
@@ -5,6 +5,7 @@
5
6
test_description='Pickaxe options'
7
8
+TEST_PASSES_SANITIZE_LEAK=true
9
. ./test-lib.sh
10
11
test_expect_success setup '
t/t4063-diff-blobs.sh
+2
@@ -1,6 +1,8 @@
1
#!/bin/sh
2
3
test_description='test direct comparison of blobs via git-diff'
4
+
5
+TEST_PASSES_SANITIZE_LEAK=true
6
. ./test-lib.sh
7
8
run_diff () {