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>
This commit is contained in:
Ævar Arnfjörð Bjarmason 2021-10-31 00:24:19 +02:00 committed by Junio C Hamano
parent f54f48fc07
commit 16d4bd4f14
25 changed files with 38 additions and 0 deletions

View File

@ -6,6 +6,8 @@
test_description='Test built-in diff output engine. test_description='Test built-in diff output engine.
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh . "$TEST_DIRECTORY"/lib-diff.sh

View File

@ -6,6 +6,8 @@
test_description='More rename detection test_description='More rename detection
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash

View File

@ -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 copy of symbolic links, but should not produce rename/copy followed
by an edit for them. by an edit for them.
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh . "$TEST_DIRECTORY"/lib-diff.sh

View File

@ -5,6 +5,8 @@
test_description='Same rename detection as t4003 but testing diff-raw.' test_description='Same rename detection as t4003 but testing diff-raw.'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash

View File

@ -6,6 +6,8 @@
test_description='Test mode change diffs. test_description='Test mode change diffs.
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
sed_script='s/\(:100644 100755\) \('"$OID_REGEX"'\) \2 /\1 X X /' sed_script='s/\(:100644 100755\) \('"$OID_REGEX"'\) \2 /\1 X X /'

View File

@ -6,6 +6,8 @@
test_description='Same rename detection as t4003 but testing diff-raw -z. test_description='Same rename detection as t4003 but testing diff-raw -z.
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash

View File

@ -9,6 +9,8 @@ Prepare:
file0 file0
path1/file1 path1/file1
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash

View File

@ -6,6 +6,8 @@
test_description='Test diff of symlinks. test_description='Test diff of symlinks.
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh . "$TEST_DIRECTORY"/lib-diff.sh

View File

@ -6,6 +6,7 @@
test_description='Binary diff and apply test_description='Binary diff and apply
' '
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
cat >expect.binary-numstat <<\EOF cat >expect.binary-numstat <<\EOF

View File

@ -2,6 +2,7 @@
test_description='external diff interface test' test_description='external diff interface test'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success setup ' test_expect_success setup '

View File

@ -2,6 +2,7 @@
test_description='common tail optimization' test_description='common tail optimization'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
z=zzzzzzzz ;# 8 z=zzzzzzzz ;# 8

View File

@ -2,6 +2,7 @@
test_description='difference in submodules' test_description='difference in submodules'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh . "$TEST_DIRECTORY"/lib-diff.sh

View File

@ -4,6 +4,7 @@
# #
test_description='diff honors config option, diff.suppressBlankEmpty' test_description='diff honors config option, diff.suppressBlankEmpty'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
cat <<\EOF >expected || cat <<\EOF >expected ||

View File

@ -2,6 +2,7 @@
test_description='diff hunk fusing' test_description='diff hunk fusing'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
f() { f() {

View File

@ -2,6 +2,7 @@
test_description='patience diff algorithm' test_description='patience diff algorithm'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff-alternative.sh . "$TEST_DIRECTORY"/lib-diff-alternative.sh

View File

@ -2,6 +2,7 @@
test_description='word diff colors' test_description='word diff colors'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff.sh . "$TEST_DIRECTORY"/lib-diff.sh

View File

@ -2,6 +2,7 @@
test_description='Return value of diffs' test_description='Return value of diffs'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success 'setup' ' test_expect_success 'setup' '

View File

@ -2,6 +2,7 @@
test_description='diff -r -t shows directory additions and deletions' test_description='diff -r -t shows directory additions and deletions'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success setup ' test_expect_success setup '

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
test_description='diff --exit-code with whitespace' test_description='diff --exit-code with whitespace'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success setup ' test_expect_success setup '

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
test_description='diff with unmerged index entries' test_description='diff with unmerged index entries'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success setup ' test_expect_success setup '

View File

@ -2,6 +2,8 @@
# Copyright (c) 2011, Google Inc. # Copyright (c) 2011, Google Inc.
test_description='diff --stat-count' test_description='diff --stat-count'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success 'setup' ' test_expect_success 'setup' '

View File

@ -2,6 +2,7 @@
test_description='histogram diff algorithm' test_description='histogram diff algorithm'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-diff-alternative.sh . "$TEST_DIRECTORY"/lib-diff-alternative.sh

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
test_description='test diff with a bogus tree containing the null sha1' test_description='test diff with a bogus tree containing the null sha1'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success 'create bogus tree' ' test_expect_success 'create bogus tree' '

View File

@ -5,6 +5,7 @@
test_description='Pickaxe options' test_description='Pickaxe options'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
test_expect_success setup ' test_expect_success setup '

View File

@ -1,6 +1,8 @@
#!/bin/sh #!/bin/sh
test_description='test direct comparison of blobs via git-diff' test_description='test direct comparison of blobs via git-diff'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh . ./test-lib.sh
run_diff () { run_diff () {