git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 00/10] leak tests: mark more tests as passing
@ 2021-10-06  9:50 Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
                   ` (11 more replies)
  0 siblings, 12 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

This goes on top of ab/sanitize-leak-ci, in that topic I introduced a
"linux-leaks" job that runs in CI and checks that we don't have
SANITIZE=leak regressions, but it just marked one test file as passing
under that mode.

That was out of an abundance of caution, and to not conflate any
potential failures with the mode itself.

This series marks up a lot of tests as passing, ensuring that they
won't regress when it comes to memory leaks.

I did a "git rebase -i --exec" of each of these commits where I merged
with origin/seen, ran all tests under
GIT_TEST_PASSING_SANITIZE_LEAK=true. They all pass, so hopefully these
won't cause any disruption. I was careful to leave out any areas that
are actively being worked on (e.g. I had to eject a test in the
"sparse" area, since it would pass on master+ab/sanitize-leak-ci, but
has a regression in "seen". I didn't look into why).

Ævar Arnfjörð Bjarmason (10):
  leak tests: run various built-in tests in t00*.sh SANITIZE=leak
  leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
  leak tests: mark t0000-init.sh as passing with SANITIZE=leak
  leak tests: mark all ls-tree tests as passing with SANITIZE=leak
  leak tests: mark all trace2 tests as passing with SANITIZE=leak
  leak tests: mark all checkout-index tests as passing with
    SANITIZE=leak
  leak tests: mark some ls-files tests as passing with SANITIZE=leak
  leak tests: mark some read-tree tests as passing with SANITIZE=leak
  leak tests: mark various "generic" tests as passing with SANITIZE=leak
  leak tests: mark some misc tests as passing with SANITIZE=leak

 t/t0001-init.sh                         | 1 +
 t/t0002-gitfile.sh                      | 1 +
 t/t0003-attributes.sh                   | 1 +
 t/t0005-signals.sh                      | 2 ++
 t/t0007-git-var.sh                      | 2 ++
 t/t0008-ignores.sh                      | 1 +
 t/t0010-racy-git.sh                     | 1 +
 t/t0013-sha1dc.sh                       | 2 ++
 t/t0022-crlf-rename.sh                  | 1 +
 t/t0024-crlf-archive.sh                 | 1 +
 t/t0025-crlf-renormalize.sh             | 1 +
 t/t0026-eol-config.sh                   | 1 +
 t/t0029-core-unsetenvvars.sh            | 1 +
 t/t0052-simple-ipc.sh                   | 1 +
 t/t0055-beyond-symlinks.sh              | 1 +
 t/t0061-run-command.sh                  | 1 +
 t/t0065-strcmp-offset.sh                | 1 +
 t/t0066-dir-iterator.sh                 | 1 +
 t/t0067-parse_pathspec_file.sh          | 1 +
 t/t0210-trace2-normal.sh                | 2 ++
 t/t0211-trace2-perf.sh                  | 2 ++
 t/t0212-trace2-event.sh                 | 2 ++
 t/t1000-read-tree-m-3way.sh             | 2 ++
 t/t1003-read-tree-prefix.sh             | 1 +
 t/t1009-read-tree-new-index.sh          | 1 +
 t/t1010-mktree.sh                       | 1 +
 t/t1012-read-tree-df.sh                 | 1 +
 t/t1014-read-tree-confusing.sh          | 2 ++
 t/t1100-commit-tree-options.sh          | 1 +
 t/t1430-bad-ref-name.sh                 | 1 +
 t/t1504-ceiling-dirs.sh                 | 2 ++
 t/t1510-repo-setup.sh                   | 1 +
 t/t2002-checkout-cache-u.sh             | 1 +
 t/t2003-checkout-cache-mkdir.sh         | 1 +
 t/t2004-checkout-cache-temp.sh          | 1 +
 t/t2005-checkout-index-symlinks.sh      | 1 +
 t/t2050-git-dir-relative.sh             | 1 +
 t/t2081-parallel-checkout-collisions.sh | 1 +
 t/t2300-cd-to-toplevel.sh               | 1 +
 t/t3000-ls-files-others.sh              | 2 ++
 t/t3002-ls-files-dashpath.sh            | 2 ++
 t/t3003-ls-files-exclude.sh             | 2 ++
 t/t3004-ls-files-basic.sh               | 1 +
 t/t3006-ls-files-long.sh                | 2 ++
 t/t3008-ls-files-lazy-init-name-hash.sh | 1 +
 t/t3070-wildmatch.sh                    | 1 +
 t/t3100-ls-tree-restrict.sh             | 2 ++
 t/t3101-ls-tree-dirname.sh              | 2 ++
 t/t3102-ls-tree-wildcards.sh            | 1 +
 t/t3103-ls-tree-misc.sh                 | 1 +
 t/t3205-branch-color.sh                 | 1 +
 t/t3211-peel-ref.sh                     | 1 +
 t/t3300-funny-names.sh                  | 1 +
 t/t3601-rm-pathspec-file.sh             | 1 +
 t/t3902-quoted.sh                       | 1 +
 t/t4002-diff-basic.sh                   | 2 ++
 t/t4016-diff-quote.sh                   | 1 +
 t/t4019-diff-wserror.sh                 | 1 +
 t/t4025-hunk-header.sh                  | 1 +
 t/t4026-color.sh                        | 2 ++
 t/t4300-merge-tree.sh                   | 2 ++
 t/t5580-unc-paths.sh                    | 1 +
 t/t5615-alternate-env.sh                | 2 ++
 t/t7518-ident-corner-cases.sh           | 2 ++
 t/t7812-grep-icase-non-ascii.sh         | 1 +
 t/t7813-grep-icase-iso.sh               | 1 +
 t/t7816-grep-binary-pattern.sh          | 1 +
 67 files changed, 87 insertions(+)

-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-07 22:33   ` Junio C Hamano
  2021-10-06  9:50 ` [PATCH 02/10] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
                   ` (10 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark various existing tests in t00*.sh that invoke git built-ins with
TEST_PASSES_SANITIZE_LEAK=true as passing when git is compiled with
SANITIZE=leak.

They'll now be whitelisted 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>
---
 t/t0002-gitfile.sh           | 1 +
 t/t0003-attributes.sh        | 1 +
 t/t0005-signals.sh           | 2 ++
 t/t0007-git-var.sh           | 2 ++
 t/t0008-ignores.sh           | 1 +
 t/t0010-racy-git.sh          | 1 +
 t/t0022-crlf-rename.sh       | 1 +
 t/t0024-crlf-archive.sh      | 1 +
 t/t0025-crlf-renormalize.sh  | 1 +
 t/t0026-eol-config.sh        | 1 +
 t/t0029-core-unsetenvvars.sh | 1 +
 t/t0055-beyond-symlinks.sh   | 1 +
 12 files changed, 14 insertions(+)

diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index 8440e6add12..76052cb5620 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -7,6 +7,7 @@ Verify that plumbing commands work when .git is a file
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 objpath() {
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 1e4c672b84a..b9ed612af13 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -2,6 +2,7 @@
 
 test_description=gitattributes
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 attr_check_basic () {
diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh
index 4c214bd11c4..a5ec6a0315c 100755
--- a/t/t0005-signals.sh
+++ b/t/t0005-signals.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='signals work as we expect'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect <<EOF
diff --git a/t/t0007-git-var.sh b/t/t0007-git-var.sh
index 88b9ae81588..53af92d571a 100755
--- a/t/t0007-git-var.sh
+++ b/t/t0007-git-var.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='basic sanity checks for git var'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'get GIT_AUTHOR_IDENT' '
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index a594b4aa7d0..532637de882 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -2,6 +2,7 @@
 
 test_description=check-ignore
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 init_vars () {
diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh
index 5657c5a87b6..837c8b7228b 100755
--- a/t/t0010-racy-git.sh
+++ b/t/t0010-racy-git.sh
@@ -2,6 +2,7 @@
 
 test_description='racy GIT'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This test can give false success if your machine is sufficiently
diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh
index 7af3fbcc7b9..c1a331e9e93 100755
--- a/t/t0022-crlf-rename.sh
+++ b/t/t0022-crlf-rename.sh
@@ -2,6 +2,7 @@
 
 test_description='ignore CR in CRLF sequence while computing similiarity'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh
index 4e9fa3cd684..a34de564207 100755
--- a/t/t0024-crlf-archive.sh
+++ b/t/t0024-crlf-archive.sh
@@ -2,6 +2,7 @@
 
 test_description='respect crlf in git archive'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0025-crlf-renormalize.sh b/t/t0025-crlf-renormalize.sh
index e13363ade5c..81447978b7f 100755
--- a/t/t0025-crlf-renormalize.sh
+++ b/t/t0025-crlf-renormalize.sh
@@ -2,6 +2,7 @@
 
 test_description='CRLF renormalization'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0026-eol-config.sh b/t/t0026-eol-config.sh
index c5203e232c8..cdcafcdff72 100755
--- a/t/t0026-eol-config.sh
+++ b/t/t0026-eol-config.sh
@@ -2,6 +2,7 @@
 
 test_description='CRLF conversion'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 has_cr() {
diff --git a/t/t0029-core-unsetenvvars.sh b/t/t0029-core-unsetenvvars.sh
index 24ce46a6ea1..b138e1d9cbc 100755
--- a/t/t0029-core-unsetenvvars.sh
+++ b/t/t0029-core-unsetenvvars.sh
@@ -2,6 +2,7 @@
 
 test_description='test the Windows-only core.unsetenvvars setting'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq MINGW
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh
index 0c6ff567a1d..6bada370225 100755
--- a/t/t0055-beyond-symlinks.sh
+++ b/t/t0055-beyond-symlinks.sh
@@ -2,6 +2,7 @@
 
 test_description='update-index and add refuse to add beyond symlinks'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success SYMLINKS setup '
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 02/10] leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark various existing tests in t00*.sh that invoke a "test-tool" with
as passing when git is compiled with SANITIZE=leak.

They'll now be whitelisted 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>
---
 t/t0013-sha1dc.sh              | 2 ++
 t/t0052-simple-ipc.sh          | 1 +
 t/t0061-run-command.sh         | 1 +
 t/t0065-strcmp-offset.sh       | 1 +
 t/t0066-dir-iterator.sh        | 1 +
 t/t0067-parse_pathspec_file.sh | 1 +
 6 files changed, 7 insertions(+)

diff --git a/t/t0013-sha1dc.sh b/t/t0013-sha1dc.sh
index 419f31a8f7d..9ad76080aa4 100755
--- a/t/t0013-sha1dc.sh
+++ b/t/t0013-sha1dc.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test sha1 collision detection'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 TEST_DATA="$TEST_DIRECTORY/t0013"
 
diff --git a/t/t0052-simple-ipc.sh b/t/t0052-simple-ipc.sh
index ff98be31a51..1a36a535743 100755
--- a/t/t0052-simple-ipc.sh
+++ b/t/t0052-simple-ipc.sh
@@ -2,6 +2,7 @@
 
 test_description='simple command server'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test-tool simple-ipc SUPPORTS_SIMPLE_IPC || {
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 7d599675e35..ee281909bc3 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -5,6 +5,7 @@
 
 test_description='Test run command'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >hello-script <<-EOF
diff --git a/t/t0065-strcmp-offset.sh b/t/t0065-strcmp-offset.sh
index 91fa639c4a7..94e34c83ed9 100755
--- a/t/t0065-strcmp-offset.sh
+++ b/t/t0065-strcmp-offset.sh
@@ -2,6 +2,7 @@
 
 test_description='Test strcmp_offset functionality'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 while read s1 s2 expect
diff --git a/t/t0066-dir-iterator.sh b/t/t0066-dir-iterator.sh
index 92910e4e6c1..63a1a45cd30 100755
--- a/t/t0066-dir-iterator.sh
+++ b/t/t0066-dir-iterator.sh
@@ -2,6 +2,7 @@
 
 test_description='Test the dir-iterator functionality'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t0067-parse_pathspec_file.sh b/t/t0067-parse_pathspec_file.sh
index 7bab49f361a..0188d0423a0 100755
--- a/t/t0067-parse_pathspec_file.sh
+++ b/t/t0067-parse_pathspec_file.sh
@@ -2,6 +2,7 @@
 
 test_description='Test parse_pathspec_file()'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'one item from stdin' '
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 02/10] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-07 22:35   ` Junio C Hamano
  2021-10-06  9:50 ` [PATCH 04/10] leak tests: mark all ls-tree tests " Ævar Arnfjörð Bjarmason
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark "t000-init.sh" as passing when git is compiled with SANITIZE=leak.

It'll now be whitelisted 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>
---
 t/t0001-init.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index df544bb321f..7603ad2f82b 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -2,6 +2,7 @@
 
 test_description='git init'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_config () {
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 04/10] leak tests: mark all ls-tree tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (2 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 05/10] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark those tests that match "*ls-tree*" as passing when git is
compiled with SANITIZE=leak. They'll now be whitelisted 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>
---
 t/t3100-ls-tree-restrict.sh  | 2 ++
 t/t3101-ls-tree-dirname.sh   | 2 ++
 t/t3102-ls-tree-wildcards.sh | 1 +
 t/t3103-ls-tree-misc.sh      | 1 +
 4 files changed, 6 insertions(+)

diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index 18baf49a49c..436de44971e 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -16,6 +16,8 @@ This test runs git ls-tree with the following in a tree.
 The new path restriction code should do the right thing for path2 and
 path2/baz.  Also path0/ should snow nothing.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 12bf31022a8..05fde642259 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -19,6 +19,8 @@ This test runs git ls-tree with the following in a tree.
 Test the handling of multiple directories which have matching file
 entries.  Also test odd filename and missing entries handling.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh
index 1e16c6b8ea6..3942db22900 100755
--- a/t/t3102-ls-tree-wildcards.sh
+++ b/t/t3102-ls-tree-wildcards.sh
@@ -2,6 +2,7 @@
 
 test_description='ls-tree with(out) globs'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t3103-ls-tree-misc.sh b/t/t3103-ls-tree-misc.sh
index 14520913afc..d18ba1bd84b 100755
--- a/t/t3103-ls-tree-misc.sh
+++ b/t/t3103-ls-tree-misc.sh
@@ -7,6 +7,7 @@ Miscellaneous tests for git ls-tree.
 
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 05/10] leak tests: mark all trace2 tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (3 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 04/10] leak tests: mark all ls-tree tests " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 06/10] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark all tests that match "*trace2*" as passing when git is
compiled with SANITIZE=leak. They'll now be whitelisted 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>
---
 t/t0210-trace2-normal.sh | 2 ++
 t/t0211-trace2-perf.sh   | 2 ++
 t/t0212-trace2-event.sh  | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/t/t0210-trace2-normal.sh b/t/t0210-trace2-normal.sh
index 0cf3a63b75b..37c359bd5a2 100755
--- a/t/t0210-trace2-normal.sh
+++ b/t/t0210-trace2-normal.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility (normal target)'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
diff --git a/t/t0211-trace2-perf.sh b/t/t0211-trace2-perf.sh
index 6ee8ee3b672..22d0845544e 100755
--- a/t/t0211-trace2-perf.sh
+++ b/t/t0211-trace2-perf.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility (perf target)'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
diff --git a/t/t0212-trace2-event.sh b/t/t0212-trace2-event.sh
index 1529155cf01..6d3374ff773 100755
--- a/t/t0212-trace2-event.sh
+++ b/t/t0212-trace2-event.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 06/10] leak tests: mark all checkout-index tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (4 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 05/10] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 07/10] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*{checkout,switch}*" as passing when git is
compiled with SANITIZE=leak. They'll now be whitelisted as running
under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
"linux-leaks" CI target).

Unfortunately almost all of those tests fail when compiled with
SANITIZE=leak, these only pass because they run "checkout-index", not
the main "checkout" command.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t2002-checkout-cache-u.sh             | 1 +
 t/t2003-checkout-cache-mkdir.sh         | 1 +
 t/t2004-checkout-cache-temp.sh          | 1 +
 t/t2005-checkout-index-symlinks.sh      | 1 +
 t/t2081-parallel-checkout-collisions.sh | 1 +
 5 files changed, 5 insertions(+)

diff --git a/t/t2002-checkout-cache-u.sh b/t/t2002-checkout-cache-u.sh
index 70361c806e1..fc95cf90485 100755
--- a/t/t2002-checkout-cache-u.sh
+++ b/t/t2002-checkout-cache-u.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index -u test.
 With -u flag, git checkout-index internally runs the equivalent of
 git update-index --refresh on the checked out entry.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
index ff163cf6750..f0fd441d810 100755
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -10,6 +10,7 @@ also verifies that such leading path may contain symlinks, unlike
 the GIT controlled paths.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index a9352b08a8b..9bb503a9757 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index --temp test.
 With --temp flag, git checkout-index writes to temporary merge files
 rather than the tracked path.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t2005-checkout-index-symlinks.sh b/t/t2005-checkout-index-symlinks.sh
index 9fa56104743..112682a45a1 100755
--- a/t/t2005-checkout-index-symlinks.sh
+++ b/t/t2005-checkout-index-symlinks.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index on filesystem w/o symlinks test.
 This tests that git checkout-index creates a symbolic link as a plain
 file if core.symlinks is false.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t2081-parallel-checkout-collisions.sh b/t/t2081-parallel-checkout-collisions.sh
index f6fcfc0c1e4..6acdb89d12b 100755
--- a/t/t2081-parallel-checkout-collisions.sh
+++ b/t/t2081-parallel-checkout-collisions.sh
@@ -11,6 +11,7 @@ The tests in this file exercise parallel checkout's collision detection code in
 both these mechanics.
 "
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-parallel-checkout.sh"
 
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 07/10] leak tests: mark some ls-files tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (5 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 06/10] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 08/10] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*ls-files*" as passing when git is
compiled with SANITIZE=leak. They'll now be whitelisted as running
under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
"linux-leaks" CI target). We still have others that match '*ls-files*"
that fail under SANITIZE=leak.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t3000-ls-files-others.sh              | 2 ++
 t/t3002-ls-files-dashpath.sh            | 2 ++
 t/t3003-ls-files-exclude.sh             | 2 ++
 t/t3004-ls-files-basic.sh               | 1 +
 t/t3006-ls-files-long.sh                | 2 ++
 t/t3008-ls-files-lazy-init-name-hash.sh | 1 +
 6 files changed, 10 insertions(+)

diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 740ce56eab5..11af4552f74 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -15,6 +15,8 @@ filesystem.
     path3/file3 - a file in a directory
     path4       - an empty directory
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ' '
diff --git a/t/t3002-ls-files-dashpath.sh b/t/t3002-ls-files-dashpath.sh
index 8704b04e1b4..54d22a45dfb 100755
--- a/t/t3002-ls-files-dashpath.sh
+++ b/t/t3002-ls-files-dashpath.sh
@@ -12,6 +12,8 @@ filesystem.
     -foo	- a file with a funny name.
     --		- another file with a funny name.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t3003-ls-files-exclude.sh b/t/t3003-ls-files-exclude.sh
index c41c4f046ab..7933dff9b38 100755
--- a/t/t3003-ls-files-exclude.sh
+++ b/t/t3003-ls-files-exclude.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='ls-files --exclude does not affect index files'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create repo with file' '
diff --git a/t/t3004-ls-files-basic.sh b/t/t3004-ls-files-basic.sh
index 9fd5a1f188a..a16e25c79bd 100755
--- a/t/t3004-ls-files-basic.sh
+++ b/t/t3004-ls-files-basic.sh
@@ -6,6 +6,7 @@ This test runs git ls-files with various unusual or malformed
 command-line arguments.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'ls-files in empty repository' '
diff --git a/t/t3006-ls-files-long.sh b/t/t3006-ls-files-long.sh
index e109c3fbfb5..2aaf91ebc8c 100755
--- a/t/t3006-ls-files-long.sh
+++ b/t/t3006-ls-files-long.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='overly long paths'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t3008-ls-files-lazy-init-name-hash.sh b/t/t3008-ls-files-lazy-init-name-hash.sh
index 85f37049587..51d3dffaa66 100755
--- a/t/t3008-ls-files-lazy-init-name-hash.sh
+++ b/t/t3008-ls-files-lazy-init-name-hash.sh
@@ -2,6 +2,7 @@
 
 test_description='Test the lazy init name hash with various folder structures'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if test 1 -eq $(test-tool online-cpus)
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 08/10] leak tests: mark some read-tree tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (6 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 07/10] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 09/10] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*read-tree*" as passing when git is
compiled with SANITIZE=leak. They'll now be whitelisted as running
under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
"linux-leaks" CI target). We still have around half the tests that
match "*read-tree*" failing, but let's whitelist those that don't.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t1000-read-tree-m-3way.sh    | 2 ++
 t/t1003-read-tree-prefix.sh    | 1 +
 t/t1009-read-tree-new-index.sh | 1 +
 t/t1012-read-tree-df.sh        | 1 +
 t/t1014-read-tree-confusing.sh | 2 ++
 5 files changed, 7 insertions(+)

diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index 013c5a7bc32..0e8c0dfbbee 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -71,6 +71,8 @@ In addition:
  DF: a special case, where A makes a directory and B makes a file.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh
index b6111cd150f..e0db2066f31 100755
--- a/t/t1003-read-tree-prefix.sh
+++ b/t/t1003-read-tree-prefix.sh
@@ -6,6 +6,7 @@
 test_description='git read-tree --prefix test.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh
index 2935f68f8d2..fc179ac5dd6 100755
--- a/t/t1009-read-tree-new-index.sh
+++ b/t/t1009-read-tree-new-index.sh
@@ -5,6 +5,7 @@ test_description='test read-tree into a fresh index file'
 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 '
diff --git a/t/t1012-read-tree-df.sh b/t/t1012-read-tree-df.sh
index 57f0770df14..cde93d22cde 100755
--- a/t/t1012-read-tree-df.sh
+++ b/t/t1012-read-tree-df.sh
@@ -2,6 +2,7 @@
 
 test_description='read-tree D/F conflict corner cases'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
diff --git a/t/t1014-read-tree-confusing.sh b/t/t1014-read-tree-confusing.sh
index da3376b3bb2..8ea8d36818b 100755
--- a/t/t1014-read-tree-confusing.sh
+++ b/t/t1014-read-tree-confusing.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check that read-tree rejects confusing paths'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create base tree' '
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 09/10] leak tests: mark various "generic" tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (7 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 08/10] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06  9:50 ` [PATCH 10/10] leak tests: mark some misc " Ævar Arnfjörð Bjarmason
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

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>
---
 t/t1430-bad-ref-name.sh       | 1 +
 t/t1504-ceiling-dirs.sh       | 2 ++
 t/t1510-repo-setup.sh         | 1 +
 t/t2050-git-dir-relative.sh   | 1 +
 t/t2300-cd-to-toplevel.sh     | 1 +
 t/t3070-wildmatch.sh          | 1 +
 t/t3205-branch-color.sh       | 1 +
 t/t3211-peel-ref.sh           | 1 +
 t/t3300-funny-names.sh        | 1 +
 t/t3902-quoted.sh             | 1 +
 t/t4026-color.sh              | 2 ++
 t/t5580-unc-paths.sh          | 1 +
 t/t5615-alternate-env.sh      | 2 ++
 t/t7518-ident-corner-cases.sh | 2 ++
 14 files changed, 18 insertions(+)

diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index b1839e08771..90b7b350a53 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -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 '
diff --git a/t/t1504-ceiling-dirs.sh b/t/t1504-ceiling-dirs.sh
index 3d51615e42d..0fafcf9dde3 100755
--- a/t/t1504-ceiling-dirs.sh
+++ b/t/t1504-ceiling-dirs.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test GIT_CEILING_DIRECTORIES'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_prefix() {
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index bbfe05b8e4a..591505a39c0 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -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)
diff --git a/t/t2050-git-dir-relative.sh b/t/t2050-git-dir-relative.sh
index 21f4659a9d1..1f193cde965 100755
--- a/t/t2050-git-dir-relative.sh
+++ b/t/t2050-git-dir-relative.sh
@@ -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"
diff --git a/t/t2300-cd-to-toplevel.sh b/t/t2300-cd-to-toplevel.sh
index c8de6d8a190..b40eeb263fe 100755
--- a/t/t2300-cd-to-toplevel.sh
+++ b/t/t2300-cd-to-toplevel.sh
@@ -2,6 +2,7 @@
 
 test_description='cd_to_toplevel'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 EXEC_PATH="$(git --exec-path)"
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh
index 56ea4bda133..72d5b014d82 100755
--- a/t/t3070-wildmatch.sh
+++ b/t/t3070-wildmatch.sh
@@ -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
diff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh
index 08bd906173b..6a521c1a3e5 100755
--- a/t/t3205-branch-color.sh
+++ b/t/t3205-branch-color.sh
@@ -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' '
diff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh
index 37b9d26f4b6..9cbc34fc583 100755
--- a/t/t3211-peel-ref.sh
+++ b/t/t3211-peel-ref.sh
@@ -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' '
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index f5bf16abcd8..d3ac826283e 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -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='	'
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index f528008c363..72a5a565e97 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -5,6 +5,7 @@
 
 test_description='quoted output'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 FN='濱野'
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index c0b642c1ab0..cc73161b466 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -4,6 +4,8 @@
 #
 
 test_description='Test diff/status color escape codes'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ESC=$(printf '\033')
diff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh
index cd803ae8bf1..cd7604fff93 100755
--- a/t/t5580-unc-paths.sh
+++ b/t/t5580-unc-paths.sh
@@ -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
diff --git a/t/t5615-alternate-env.sh b/t/t5615-alternate-env.sh
index b4905b822c0..83513e46a35 100755
--- a/t/t5615-alternate-env.sh
+++ b/t/t5615-alternate-env.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='handling of alternates in environment variables'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_obj () {
diff --git a/t/t7518-ident-corner-cases.sh b/t/t7518-ident-corner-cases.sh
index 905957bd0a1..fffdb6ff2e7 100755
--- a/t/t7518-ident-corner-cases.sh
+++ b/t/t7518-ident-corner-cases.sh
@@ -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
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH 10/10] leak tests: mark some misc tests as passing with SANITIZE=leak
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (8 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 09/10] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
@ 2021-10-06  9:50 ` Ævar Arnfjörð Bjarmason
  2021-10-06 16:26 ` [PATCH 00/10] leak tests: mark more tests as passing Elijah Newren
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
  11 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-06  9:50 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*{mktree,commit,diff,grep,rm,merge,hunk}*"
as passing when git is compiled with SANITIZE=leak. They'll now be
whitelisted as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true"
test mode (the "linux-leaks" CI target).

These were picked because we still have a lot of failures in adjacent
areas, and we didn't have much if any coverage of e.g. grep and diff
before this change, we could still whitelist a lot more tests, but
let's stop for now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t1010-mktree.sh               | 1 +
 t/t1100-commit-tree-options.sh  | 1 +
 t/t3601-rm-pathspec-file.sh     | 1 +
 t/t4002-diff-basic.sh           | 2 ++
 t/t4016-diff-quote.sh           | 1 +
 t/t4019-diff-wserror.sh         | 1 +
 t/t4025-hunk-header.sh          | 1 +
 t/t4300-merge-tree.sh           | 2 ++
 t/t7812-grep-icase-non-ascii.sh | 1 +
 t/t7813-grep-icase-iso.sh       | 1 +
 t/t7816-grep-binary-pattern.sh  | 1 +
 11 files changed, 13 insertions(+)

diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh
index b946f876864..48bfad07abc 100755
--- a/t/t1010-mktree.sh
+++ b/t/t1010-mktree.sh
@@ -2,6 +2,7 @@
 
 test_description='git mktree'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh
index ae66ba5babf..0f37a43fd3c 100755
--- a/t/t1100-commit-tree-options.sh
+++ b/t/t1100-commit-tree-options.sh
@@ -12,6 +12,7 @@ Also make sure that command line parser understands the normal
 "flags first and then non flag arguments" command line.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expected <<EOF
diff --git a/t/t3601-rm-pathspec-file.sh b/t/t3601-rm-pathspec-file.sh
index 7de21f8bcff..b2a8db69afc 100755
--- a/t/t3601-rm-pathspec-file.sh
+++ b/t/t3601-rm-pathspec-file.sh
@@ -2,6 +2,7 @@
 
 test_description='rm --pathspec-from-file'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index 6a9f010197c..ea52e5b91b7 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -6,6 +6,8 @@
 test_description='Test diff raw-output.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index 876271d6826..5a8d8876831 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -6,6 +6,7 @@
 test_description='Quoting paths in diff output.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 P0='pathname'
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh
index c6135c75488..c68729ac098 100755
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -2,6 +2,7 @@
 
 test_description='diff whitespace error detection'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh
index 35578f2bb91..6356961de46 100755
--- a/t/t4025-hunk-header.sh
+++ b/t/t4025-hunk-header.sh
@@ -2,6 +2,7 @@
 
 test_description='diff hunk header truncation'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 N='日本語'
diff --git a/t/t4300-merge-tree.sh b/t/t4300-merge-tree.sh
index e59601e5fe9..c52c8a21fae 100755
--- a/t/t4300-merge-tree.sh
+++ b/t/t4300-merge-tree.sh
@@ -4,6 +4,8 @@
 #
 
 test_description='git merge-tree'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t7812-grep-icase-non-ascii.sh b/t/t7812-grep-icase-non-ascii.sh
index e5d1e4ea686..79419ead025 100755
--- a/t/t7812-grep-icase-non-ascii.sh
+++ b/t/t7812-grep-icase-non-ascii.sh
@@ -2,6 +2,7 @@
 
 test_description='grep icase on non-English locales'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success GETTEXT_LOCALE 'setup' '
diff --git a/t/t7813-grep-icase-iso.sh b/t/t7813-grep-icase-iso.sh
index 701e08a8e59..1227885737b 100755
--- a/t/t7813-grep-icase-iso.sh
+++ b/t/t7813-grep-icase-iso.sh
@@ -2,6 +2,7 @@
 
 test_description='grep icase on non-English locales'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success GETTEXT_ISO_LOCALE 'setup' '
diff --git a/t/t7816-grep-binary-pattern.sh b/t/t7816-grep-binary-pattern.sh
index 9d67a5fc4cf..fdb2355649e 100755
--- a/t/t7816-grep-binary-pattern.sh
+++ b/t/t7816-grep-binary-pattern.sh
@@ -2,6 +2,7 @@
 
 test_description='git grep with a binary pattern files'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 nul_match_internal () {
-- 
2.33.0.1441.gbbcdb4c3c66


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH 00/10] leak tests: mark more tests as passing
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (9 preceding siblings ...)
  2021-10-06  9:50 ` [PATCH 10/10] leak tests: mark some misc " Ævar Arnfjörð Bjarmason
@ 2021-10-06 16:26 ` Elijah Newren
  2021-10-07 22:38   ` Junio C Hamano
  2021-10-12 13:40   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
  11 siblings, 2 replies; 27+ messages in thread
From: Elijah Newren @ 2021-10-06 16:26 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: Git Mailing List, Junio C Hamano, Martin Ågren, Andrzej Hunt,
	Jeff King

On Wed, Oct 6, 2021 at 2:50 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>
> This goes on top of ab/sanitize-leak-ci, in that topic I introduced a
> "linux-leaks" job that runs in CI and checks that we don't have
> SANITIZE=leak regressions, but it just marked one test file as passing
> under that mode.
>
> That was out of an abundance of caution, and to not conflate any
> potential failures with the mode itself.
>
> This series marks up a lot of tests as passing, ensuring that they
> won't regress when it comes to memory leaks.

I like the series.  It does have the potential to annoy folks who want
to add additional tests which make use of git commands outside the
area they are modifying and which happen to have pre-existing leaks.
But, I think in such cases, they could just remove the
TEST_PASSES_SANITIZE_LEAK=true and mention it in their commit message.
And when the checks fail because of a git command someone is
modifying, then we get useful early signal and the author can address
the problem.

>
> I did a "git rebase -i --exec" of each of these commits where I merged
> with origin/seen, ran all tests under
> GIT_TEST_PASSING_SANITIZE_LEAK=true. They all pass, so hopefully these
> won't cause any disruption. I was careful to leave out any areas that
> are actively being worked on (e.g. I had to eject a test in the
> "sparse" area, since it would pass on master+ab/sanitize-leak-ci, but
> has a regression in "seen". I didn't look into why).
>
> Ævar Arnfjörð Bjarmason (10):
>   leak tests: run various built-in tests in t00*.sh SANITIZE=leak
>   leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
>   leak tests: mark t0000-init.sh as passing with SANITIZE=leak
>   leak tests: mark all ls-tree tests as passing with SANITIZE=leak
>   leak tests: mark all trace2 tests as passing with SANITIZE=leak
>   leak tests: mark all checkout-index tests as passing with
>     SANITIZE=leak
>   leak tests: mark some ls-files tests as passing with SANITIZE=leak
>   leak tests: mark some read-tree tests as passing with SANITIZE=leak
>   leak tests: mark various "generic" tests as passing with SANITIZE=leak
>   leak tests: mark some misc tests as passing with SANITIZE=leak
>
>  t/t0001-init.sh                         | 1 +
>  t/t0002-gitfile.sh                      | 1 +
>  t/t0003-attributes.sh                   | 1 +
>  t/t0005-signals.sh                      | 2 ++
>  t/t0007-git-var.sh                      | 2 ++
>  t/t0008-ignores.sh                      | 1 +
>  t/t0010-racy-git.sh                     | 1 +
>  t/t0013-sha1dc.sh                       | 2 ++
>  t/t0022-crlf-rename.sh                  | 1 +
>  t/t0024-crlf-archive.sh                 | 1 +
>  t/t0025-crlf-renormalize.sh             | 1 +
>  t/t0026-eol-config.sh                   | 1 +
>  t/t0029-core-unsetenvvars.sh            | 1 +
>  t/t0052-simple-ipc.sh                   | 1 +
>  t/t0055-beyond-symlinks.sh              | 1 +
>  t/t0061-run-command.sh                  | 1 +
>  t/t0065-strcmp-offset.sh                | 1 +
>  t/t0066-dir-iterator.sh                 | 1 +
>  t/t0067-parse_pathspec_file.sh          | 1 +
>  t/t0210-trace2-normal.sh                | 2 ++
>  t/t0211-trace2-perf.sh                  | 2 ++
>  t/t0212-trace2-event.sh                 | 2 ++
>  t/t1000-read-tree-m-3way.sh             | 2 ++
>  t/t1003-read-tree-prefix.sh             | 1 +
>  t/t1009-read-tree-new-index.sh          | 1 +
>  t/t1010-mktree.sh                       | 1 +
>  t/t1012-read-tree-df.sh                 | 1 +
>  t/t1014-read-tree-confusing.sh          | 2 ++
>  t/t1100-commit-tree-options.sh          | 1 +
>  t/t1430-bad-ref-name.sh                 | 1 +
>  t/t1504-ceiling-dirs.sh                 | 2 ++
>  t/t1510-repo-setup.sh                   | 1 +
>  t/t2002-checkout-cache-u.sh             | 1 +
>  t/t2003-checkout-cache-mkdir.sh         | 1 +
>  t/t2004-checkout-cache-temp.sh          | 1 +
>  t/t2005-checkout-index-symlinks.sh      | 1 +
>  t/t2050-git-dir-relative.sh             | 1 +
>  t/t2081-parallel-checkout-collisions.sh | 1 +
>  t/t2300-cd-to-toplevel.sh               | 1 +
>  t/t3000-ls-files-others.sh              | 2 ++
>  t/t3002-ls-files-dashpath.sh            | 2 ++
>  t/t3003-ls-files-exclude.sh             | 2 ++
>  t/t3004-ls-files-basic.sh               | 1 +
>  t/t3006-ls-files-long.sh                | 2 ++
>  t/t3008-ls-files-lazy-init-name-hash.sh | 1 +
>  t/t3070-wildmatch.sh                    | 1 +
>  t/t3100-ls-tree-restrict.sh             | 2 ++
>  t/t3101-ls-tree-dirname.sh              | 2 ++
>  t/t3102-ls-tree-wildcards.sh            | 1 +
>  t/t3103-ls-tree-misc.sh                 | 1 +
>  t/t3205-branch-color.sh                 | 1 +
>  t/t3211-peel-ref.sh                     | 1 +
>  t/t3300-funny-names.sh                  | 1 +
>  t/t3601-rm-pathspec-file.sh             | 1 +
>  t/t3902-quoted.sh                       | 1 +
>  t/t4002-diff-basic.sh                   | 2 ++
>  t/t4016-diff-quote.sh                   | 1 +
>  t/t4019-diff-wserror.sh                 | 1 +
>  t/t4025-hunk-header.sh                  | 1 +
>  t/t4026-color.sh                        | 2 ++
>  t/t4300-merge-tree.sh                   | 2 ++
>  t/t5580-unc-paths.sh                    | 1 +
>  t/t5615-alternate-env.sh                | 2 ++
>  t/t7518-ident-corner-cases.sh           | 2 ++
>  t/t7812-grep-icase-non-ascii.sh         | 1 +
>  t/t7813-grep-icase-iso.sh               | 1 +
>  t/t7816-grep-binary-pattern.sh          | 1 +
>  67 files changed, 87 insertions(+)
>
> --
> 2.33.0.1441.gbbcdb4c3c66

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak
  2021-10-06  9:50 ` [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-07 22:33   ` Junio C Hamano
  0 siblings, 0 replies; 27+ messages in thread
From: Junio C Hamano @ 2021-10-07 22:33 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Elijah Newren, Martin Ågren, Andrzej Hunt, Jeff King

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> They'll now be whitelisted as running under the
> "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
> target).

The above would be equally clear with s/white// applied, so let's
use a shorter word.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak
  2021-10-06  9:50 ` [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-07 22:35   ` Junio C Hamano
  2021-10-12 13:39     ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 27+ messages in thread
From: Junio C Hamano @ 2021-10-07 22:35 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason
  Cc: git, Elijah Newren, Martin Ågren, Andrzej Hunt, Jeff King

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Mark "t000-init.sh" as passing when git is compiled with SANITIZE=leak.

"t0000-init.sh", I think.  Why should we have a separate one for
this script, rather than it being a part of [01/10]?

>
> It'll now be whitelisted 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>
> ---
>  t/t0001-init.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/t/t0001-init.sh b/t/t0001-init.sh
> index df544bb321f..7603ad2f82b 100755
> --- a/t/t0001-init.sh
> +++ b/t/t0001-init.sh
> @@ -2,6 +2,7 @@
>  
>  test_description='git init'
>  
> +TEST_PASSES_SANITIZE_LEAK=true
>  . ./test-lib.sh
>  
>  check_config () {

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 00/10] leak tests: mark more tests as passing
  2021-10-06 16:26 ` [PATCH 00/10] leak tests: mark more tests as passing Elijah Newren
@ 2021-10-07 22:38   ` Junio C Hamano
  2021-10-12 13:40   ` Ævar Arnfjörð Bjarmason
  1 sibling, 0 replies; 27+ messages in thread
From: Junio C Hamano @ 2021-10-07 22:38 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason, Elijah Newren
  Cc: Git Mailing List, Martin Ågren, Andrzej Hunt, Jeff King

Elijah Newren <newren@gmail.com> writes:

> I like the series.  It does have the potential to annoy folks who want
> to add additional tests which make use of git commands outside the
> area they are modifying and which happen to have pre-existing leaks.

True on both counts.

Except for the t000-*.sh thing being a separate, and s/white//
everywhere, I think all of them looked sensible and almost ready to
be picked up.

Thanks.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak
  2021-10-07 22:35   ` Junio C Hamano
@ 2021-10-12 13:39     ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:39 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: git, Elijah Newren, Martin Ågren, Andrzej Hunt, Jeff King


On Thu, Oct 07 2021, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Mark "t000-init.sh" as passing when git is compiled with SANITIZE=leak.
>
> "t0000-init.sh", I think.  Why should we have a separate one for
> this script, rather than it being a part of [01/10]?

I figured t0000-init.sh was big & scary compared to the rest, but will
squash.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH 00/10] leak tests: mark more tests as passing
  2021-10-06 16:26 ` [PATCH 00/10] leak tests: mark more tests as passing Elijah Newren
  2021-10-07 22:38   ` Junio C Hamano
@ 2021-10-12 13:40   ` Ævar Arnfjörð Bjarmason
  1 sibling, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:40 UTC (permalink / raw)
  To: Elijah Newren
  Cc: Git Mailing List, Junio C Hamano, Martin Ågren, Andrzej Hunt,
	Jeff King


On Wed, Oct 06 2021, Elijah Newren wrote:

> On Wed, Oct 6, 2021 at 2:50 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
>>
>> This goes on top of ab/sanitize-leak-ci, in that topic I introduced a
>> "linux-leaks" job that runs in CI and checks that we don't have
>> SANITIZE=leak regressions, but it just marked one test file as passing
>> under that mode.
>>
>> That was out of an abundance of caution, and to not conflate any
>> potential failures with the mode itself.
>>
>> This series marks up a lot of tests as passing, ensuring that they
>> won't regress when it comes to memory leaks.
>
> I like the series.  It does have the potential to annoy folks who want
> to add additional tests which make use of git commands outside the
> area they are modifying and which happen to have pre-existing leaks.
> But, I think in such cases, they could just remove the
> TEST_PASSES_SANITIZE_LEAK=true and mention it in their commit message.
> And when the checks fail because of a git command someone is
> modifying, then we get useful early signal and the author can address
> the problem.

Yes there's a definite chance for annoyance while the common leak fixes
I've got planned are cooking, i.e. as we've discussed elsewhere "git
log" and "git checkout" among others leak in almost any invocation you
cank think of, so if you add a new test that steps on those landmines
(including via test_commit!) you'll run afoul of this.

But I'm hoping to have those common cases sorted out SOON, so hopefully
any problems with this are short lived.

Just FWIW if this does happen you probably won't and shouldn't need to
remove the TEST_PASSES_SANITIZE_LEAK=true entirely, it should be enough
to make the specific test use "!SANITIZE_LEAK" as a prerequisite. See
956d2e4639b (tests: add a test mode for SANITIZE=leak, run it in CI,
2021-09-23).

Well, that can also get annoying if e.g. you want to add a "test_commit"
to a short test that has an existing setup (you'd need to split up the
"setup" phase).

Anyway, will re-roll, just FYI^
 


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v2 0/9] leak tests: mark more tests as passing
  2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
                   ` (10 preceding siblings ...)
  2021-10-06 16:26 ` [PATCH 00/10] leak tests: mark more tests as passing Elijah Newren
@ 2021-10-12 13:56 ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 1/9] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
                     ` (8 more replies)
  11 siblings, 9 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

This goes on top of the now-landed ab/sanitize-leak-ci and marks more
tests as passing.

The changes since v1 are to address commit a message nit
(s/whitelisted/listed/g), and I ejected the marking of
"t7812-grep-icase-non-ascii.sh" as passing, since this in combination
with 55dbc6f9987 (grep: fix an edge case concerning ascii patterns and
UTF-8 data, 2021-10-07) in "seen would cause it to fail. I don't think
that's a "real" failure, just a new test using a command that happens
to leak, but let's just skip it for now, we can mark it later after
those leaks are fixed.

Ævar Arnfjörð Bjarmason (9):
  leak tests: run various built-in tests in t00*.sh SANITIZE=leak
  leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
  leak tests: mark all ls-tree tests as passing with SANITIZE=leak
  leak tests: mark all trace2 tests as passing with SANITIZE=leak
  leak tests: mark all checkout-index tests as passing with
    SANITIZE=leak
  leak tests: mark some ls-files tests as passing with SANITIZE=leak
  leak tests: mark some read-tree tests as passing with SANITIZE=leak
  leak tests: mark various "generic" tests as passing with SANITIZE=leak
  leak tests: mark some misc tests as passing with SANITIZE=leak

 t/t0001-init.sh                         | 1 +
 t/t0002-gitfile.sh                      | 1 +
 t/t0003-attributes.sh                   | 1 +
 t/t0005-signals.sh                      | 2 ++
 t/t0007-git-var.sh                      | 2 ++
 t/t0008-ignores.sh                      | 1 +
 t/t0010-racy-git.sh                     | 1 +
 t/t0013-sha1dc.sh                       | 2 ++
 t/t0022-crlf-rename.sh                  | 1 +
 t/t0024-crlf-archive.sh                 | 1 +
 t/t0025-crlf-renormalize.sh             | 1 +
 t/t0026-eol-config.sh                   | 1 +
 t/t0029-core-unsetenvvars.sh            | 1 +
 t/t0052-simple-ipc.sh                   | 1 +
 t/t0055-beyond-symlinks.sh              | 1 +
 t/t0061-run-command.sh                  | 1 +
 t/t0065-strcmp-offset.sh                | 1 +
 t/t0066-dir-iterator.sh                 | 1 +
 t/t0067-parse_pathspec_file.sh          | 1 +
 t/t0210-trace2-normal.sh                | 2 ++
 t/t0211-trace2-perf.sh                  | 2 ++
 t/t0212-trace2-event.sh                 | 2 ++
 t/t1000-read-tree-m-3way.sh             | 2 ++
 t/t1003-read-tree-prefix.sh             | 1 +
 t/t1009-read-tree-new-index.sh          | 1 +
 t/t1010-mktree.sh                       | 1 +
 t/t1012-read-tree-df.sh                 | 1 +
 t/t1014-read-tree-confusing.sh          | 2 ++
 t/t1100-commit-tree-options.sh          | 1 +
 t/t1430-bad-ref-name.sh                 | 1 +
 t/t1504-ceiling-dirs.sh                 | 2 ++
 t/t1510-repo-setup.sh                   | 1 +
 t/t2002-checkout-cache-u.sh             | 1 +
 t/t2003-checkout-cache-mkdir.sh         | 1 +
 t/t2004-checkout-cache-temp.sh          | 1 +
 t/t2005-checkout-index-symlinks.sh      | 1 +
 t/t2050-git-dir-relative.sh             | 1 +
 t/t2081-parallel-checkout-collisions.sh | 1 +
 t/t2300-cd-to-toplevel.sh               | 1 +
 t/t3000-ls-files-others.sh              | 2 ++
 t/t3002-ls-files-dashpath.sh            | 2 ++
 t/t3003-ls-files-exclude.sh             | 2 ++
 t/t3004-ls-files-basic.sh               | 1 +
 t/t3006-ls-files-long.sh                | 2 ++
 t/t3008-ls-files-lazy-init-name-hash.sh | 1 +
 t/t3070-wildmatch.sh                    | 1 +
 t/t3100-ls-tree-restrict.sh             | 2 ++
 t/t3101-ls-tree-dirname.sh              | 2 ++
 t/t3102-ls-tree-wildcards.sh            | 1 +
 t/t3103-ls-tree-misc.sh                 | 1 +
 t/t3205-branch-color.sh                 | 1 +
 t/t3211-peel-ref.sh                     | 1 +
 t/t3300-funny-names.sh                  | 1 +
 t/t3601-rm-pathspec-file.sh             | 1 +
 t/t3902-quoted.sh                       | 1 +
 t/t4002-diff-basic.sh                   | 2 ++
 t/t4016-diff-quote.sh                   | 1 +
 t/t4019-diff-wserror.sh                 | 1 +
 t/t4025-hunk-header.sh                  | 1 +
 t/t4026-color.sh                        | 2 ++
 t/t4300-merge-tree.sh                   | 2 ++
 t/t5580-unc-paths.sh                    | 1 +
 t/t5615-alternate-env.sh                | 2 ++
 t/t7518-ident-corner-cases.sh           | 2 ++
 t/t7813-grep-icase-iso.sh               | 1 +
 t/t7816-grep-binary-pattern.sh          | 1 +
 66 files changed, 86 insertions(+)

Range-diff against v1:
 1:  67fbd70c55a !  1:  4a426acf701 leak tests: run various built-in tests in t00*.sh SANITIZE=leak
    @@ Commit message
         TEST_PASSES_SANITIZE_LEAK=true as passing when git is compiled with
         SANITIZE=leak.
     
    -    They'll now be whitelisted as running under the
    +    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>
     
    + ## t/t0001-init.sh ##
    +@@
    + 
    + test_description='git init'
    + 
    ++TEST_PASSES_SANITIZE_LEAK=true
    + . ./test-lib.sh
    + 
    + check_config () {
    +
      ## t/t0002-gitfile.sh ##
     @@ t/t0002-gitfile.sh: Verify that plumbing commands work when .git is a file
      GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 2:  9a8804e1d9a !  2:  6c868ae4ae1 leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
    @@ Commit message
         Mark various existing tests in t00*.sh that invoke a "test-tool" with
         as passing when git is compiled with SANITIZE=leak.
     
    -    They'll now be whitelisted as running under the
    +    They'll now be listed as running under the
         "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI
         target).
     
 3:  3a7dd917d9f <  -:  ----------- leak tests: mark t0000-init.sh as passing with SANITIZE=leak
 4:  e18b5093a52 !  3:  dab4752680c leak tests: mark all ls-tree tests as passing with SANITIZE=leak
    @@ Commit message
         leak tests: mark all ls-tree tests as passing with SANITIZE=leak
     
         Mark those tests that match "*ls-tree*" as passing when git is
    -    compiled with SANITIZE=leak. They'll now be whitelisted as running
    -    under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
    -    "linux-leaks" CI target).
    +    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>
     
 5:  da2631ce626 !  4:  df235c1dc68 leak tests: mark all trace2 tests as passing with SANITIZE=leak
    @@ Metadata
      ## Commit message ##
         leak tests: mark all trace2 tests as passing with SANITIZE=leak
     
    -    Mark all tests that match "*trace2*" as passing when git is
    -    compiled with SANITIZE=leak. They'll now be whitelisted as running
    -    under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
    -    "linux-leaks" CI target).
    +    Mark all tests that match "*trace2*" 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>
     
 6:  7ab1583c77d !  5:  39a0199d5c6 leak tests: mark all checkout-index tests as passing with SANITIZE=leak
    @@ Metadata
      ## Commit message ##
         leak tests: mark all checkout-index tests as passing with SANITIZE=leak
     
    -    Mark some tests that match "*{checkout,switch}*" as passing when git is
    -    compiled with SANITIZE=leak. They'll now be whitelisted as running
    -    under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
    -    "linux-leaks" CI target).
    +    Mark some tests that match "*{checkout,switch}*" 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).
     
         Unfortunately almost all of those tests fail when compiled with
         SANITIZE=leak, these only pass because they run "checkout-index", not
 7:  b913feca9d8 !  6:  45d3f07cd15 leak tests: mark some ls-files tests as passing with SANITIZE=leak
    @@ Commit message
         leak tests: mark some ls-files tests as passing with SANITIZE=leak
     
         Mark some tests that match "*ls-files*" as passing when git is
    -    compiled with SANITIZE=leak. They'll now be whitelisted as running
    -    under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
    -    "linux-leaks" CI target). We still have others that match '*ls-files*"
    -    that fail under SANITIZE=leak.
    +    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). We still have others that match '*ls-files*" that fail
    +    under SANITIZE=leak.
     
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
 8:  d2d7f9f9f8c !  7:  889e7227abf leak tests: mark some read-tree tests as passing with SANITIZE=leak
    @@ Commit message
         leak tests: mark some read-tree tests as passing with SANITIZE=leak
     
         Mark some tests that match "*read-tree*" as passing when git is
    -    compiled with SANITIZE=leak. They'll now be whitelisted as running
    -    under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the
    -    "linux-leaks" CI target). We still have around half the tests that
    -    match "*read-tree*" failing, but let's whitelist those that don't.
    +    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). We still have around half the tests that match
    +    "*read-tree*" failing, but let's whitelist those that don't.
     
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
 9:  9299634b932 =  8:  a4843f35004 leak tests: mark various "generic" tests as passing with SANITIZE=leak
10:  1b68890f614 !  9:  ba30265cb72 leak tests: mark some misc tests as passing with SANITIZE=leak
    @@ Commit message
     
         Mark some tests that match "*{mktree,commit,diff,grep,rm,merge,hunk}*"
         as passing when git is compiled with SANITIZE=leak. They'll now be
    -    whitelisted as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true"
    -    test mode (the "linux-leaks" CI target).
    +    listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test
    +    mode (the "linux-leaks" CI target).
     
         These were picked because we still have a lot of failures in adjacent
         areas, and we didn't have much if any coverage of e.g. grep and diff
    @@ t/t4300-merge-tree.sh
      
      test_expect_success setup '
     
    - ## t/t7812-grep-icase-non-ascii.sh ##
    -@@
    - 
    - test_description='grep icase on non-English locales'
    - 
    -+TEST_PASSES_SANITIZE_LEAK=true
    - . ./lib-gettext.sh
    - 
    - test_expect_success GETTEXT_LOCALE 'setup' '
    -
      ## t/t7813-grep-icase-iso.sh ##
     @@
      
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v2 1/9] leak tests: run various built-in tests in t00*.sh SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 2/9] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
                     ` (7 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark various existing tests in t00*.sh that invoke git built-ins with
TEST_PASSES_SANITIZE_LEAK=true 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>
---
 t/t0001-init.sh              | 1 +
 t/t0002-gitfile.sh           | 1 +
 t/t0003-attributes.sh        | 1 +
 t/t0005-signals.sh           | 2 ++
 t/t0007-git-var.sh           | 2 ++
 t/t0008-ignores.sh           | 1 +
 t/t0010-racy-git.sh          | 1 +
 t/t0022-crlf-rename.sh       | 1 +
 t/t0024-crlf-archive.sh      | 1 +
 t/t0025-crlf-renormalize.sh  | 1 +
 t/t0026-eol-config.sh        | 1 +
 t/t0029-core-unsetenvvars.sh | 1 +
 t/t0055-beyond-symlinks.sh   | 1 +
 13 files changed, 15 insertions(+)

diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index df544bb321f..7603ad2f82b 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -2,6 +2,7 @@
 
 test_description='git init'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_config () {
diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh
index 8440e6add12..76052cb5620 100755
--- a/t/t0002-gitfile.sh
+++ b/t/t0002-gitfile.sh
@@ -7,6 +7,7 @@ Verify that plumbing commands work when .git is a file
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 objpath() {
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index 1e4c672b84a..b9ed612af13 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -2,6 +2,7 @@
 
 test_description=gitattributes
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 attr_check_basic () {
diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh
index 4c214bd11c4..a5ec6a0315c 100755
--- a/t/t0005-signals.sh
+++ b/t/t0005-signals.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='signals work as we expect'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expect <<EOF
diff --git a/t/t0007-git-var.sh b/t/t0007-git-var.sh
index 88b9ae81588..53af92d571a 100755
--- a/t/t0007-git-var.sh
+++ b/t/t0007-git-var.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='basic sanity checks for git var'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'get GIT_AUTHOR_IDENT' '
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index a594b4aa7d0..532637de882 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -2,6 +2,7 @@
 
 test_description=check-ignore
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 init_vars () {
diff --git a/t/t0010-racy-git.sh b/t/t0010-racy-git.sh
index 5657c5a87b6..837c8b7228b 100755
--- a/t/t0010-racy-git.sh
+++ b/t/t0010-racy-git.sh
@@ -2,6 +2,7 @@
 
 test_description='racy GIT'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # This test can give false success if your machine is sufficiently
diff --git a/t/t0022-crlf-rename.sh b/t/t0022-crlf-rename.sh
index 7af3fbcc7b9..c1a331e9e93 100755
--- a/t/t0022-crlf-rename.sh
+++ b/t/t0022-crlf-rename.sh
@@ -2,6 +2,7 @@
 
 test_description='ignore CR in CRLF sequence while computing similiarity'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0024-crlf-archive.sh b/t/t0024-crlf-archive.sh
index 4e9fa3cd684..a34de564207 100755
--- a/t/t0024-crlf-archive.sh
+++ b/t/t0024-crlf-archive.sh
@@ -2,6 +2,7 @@
 
 test_description='respect crlf in git archive'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0025-crlf-renormalize.sh b/t/t0025-crlf-renormalize.sh
index e13363ade5c..81447978b7f 100755
--- a/t/t0025-crlf-renormalize.sh
+++ b/t/t0025-crlf-renormalize.sh
@@ -2,6 +2,7 @@
 
 test_description='CRLF renormalization'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t0026-eol-config.sh b/t/t0026-eol-config.sh
index c5203e232c8..cdcafcdff72 100755
--- a/t/t0026-eol-config.sh
+++ b/t/t0026-eol-config.sh
@@ -2,6 +2,7 @@
 
 test_description='CRLF conversion'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 has_cr() {
diff --git a/t/t0029-core-unsetenvvars.sh b/t/t0029-core-unsetenvvars.sh
index 24ce46a6ea1..b138e1d9cbc 100755
--- a/t/t0029-core-unsetenvvars.sh
+++ b/t/t0029-core-unsetenvvars.sh
@@ -2,6 +2,7 @@
 
 test_description='test the Windows-only core.unsetenvvars setting'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if ! test_have_prereq MINGW
diff --git a/t/t0055-beyond-symlinks.sh b/t/t0055-beyond-symlinks.sh
index 0c6ff567a1d..6bada370225 100755
--- a/t/t0055-beyond-symlinks.sh
+++ b/t/t0055-beyond-symlinks.sh
@@ -2,6 +2,7 @@
 
 test_description='update-index and add refuse to add beyond symlinks'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success SYMLINKS setup '
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 2/9] leak tests: run various "test-tool" tests in t00*.sh SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 1/9] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 3/9] leak tests: mark all ls-tree tests as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
                     ` (6 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark various existing tests in t00*.sh that invoke a "test-tool" with
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>
---
 t/t0013-sha1dc.sh              | 2 ++
 t/t0052-simple-ipc.sh          | 1 +
 t/t0061-run-command.sh         | 1 +
 t/t0065-strcmp-offset.sh       | 1 +
 t/t0066-dir-iterator.sh        | 1 +
 t/t0067-parse_pathspec_file.sh | 1 +
 6 files changed, 7 insertions(+)

diff --git a/t/t0013-sha1dc.sh b/t/t0013-sha1dc.sh
index 419f31a8f7d..9ad76080aa4 100755
--- a/t/t0013-sha1dc.sh
+++ b/t/t0013-sha1dc.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test sha1 collision detection'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 TEST_DATA="$TEST_DIRECTORY/t0013"
 
diff --git a/t/t0052-simple-ipc.sh b/t/t0052-simple-ipc.sh
index ff98be31a51..1a36a535743 100755
--- a/t/t0052-simple-ipc.sh
+++ b/t/t0052-simple-ipc.sh
@@ -2,6 +2,7 @@
 
 test_description='simple command server'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test-tool simple-ipc SUPPORTS_SIMPLE_IPC || {
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 7d599675e35..ee281909bc3 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -5,6 +5,7 @@
 
 test_description='Test run command'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >hello-script <<-EOF
diff --git a/t/t0065-strcmp-offset.sh b/t/t0065-strcmp-offset.sh
index 91fa639c4a7..94e34c83ed9 100755
--- a/t/t0065-strcmp-offset.sh
+++ b/t/t0065-strcmp-offset.sh
@@ -2,6 +2,7 @@
 
 test_description='Test strcmp_offset functionality'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 while read s1 s2 expect
diff --git a/t/t0066-dir-iterator.sh b/t/t0066-dir-iterator.sh
index 92910e4e6c1..63a1a45cd30 100755
--- a/t/t0066-dir-iterator.sh
+++ b/t/t0066-dir-iterator.sh
@@ -2,6 +2,7 @@
 
 test_description='Test the dir-iterator functionality'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t0067-parse_pathspec_file.sh b/t/t0067-parse_pathspec_file.sh
index 7bab49f361a..0188d0423a0 100755
--- a/t/t0067-parse_pathspec_file.sh
+++ b/t/t0067-parse_pathspec_file.sh
@@ -2,6 +2,7 @@
 
 test_description='Test parse_pathspec_file()'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'one item from stdin' '
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 3/9] leak tests: mark all ls-tree tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 1/9] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 2/9] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 4/9] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
                     ` (5 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark those tests that match "*ls-tree*" 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>
---
 t/t3100-ls-tree-restrict.sh  | 2 ++
 t/t3101-ls-tree-dirname.sh   | 2 ++
 t/t3102-ls-tree-wildcards.sh | 1 +
 t/t3103-ls-tree-misc.sh      | 1 +
 4 files changed, 6 insertions(+)

diff --git a/t/t3100-ls-tree-restrict.sh b/t/t3100-ls-tree-restrict.sh
index 18baf49a49c..436de44971e 100755
--- a/t/t3100-ls-tree-restrict.sh
+++ b/t/t3100-ls-tree-restrict.sh
@@ -16,6 +16,8 @@ This test runs git ls-tree with the following in a tree.
 The new path restriction code should do the right thing for path2 and
 path2/baz.  Also path0/ should snow nothing.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t3101-ls-tree-dirname.sh b/t/t3101-ls-tree-dirname.sh
index 12bf31022a8..05fde642259 100755
--- a/t/t3101-ls-tree-dirname.sh
+++ b/t/t3101-ls-tree-dirname.sh
@@ -19,6 +19,8 @@ This test runs git ls-tree with the following in a tree.
 Test the handling of multiple directories which have matching file
 entries.  Also test odd filename and missing entries handling.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t3102-ls-tree-wildcards.sh b/t/t3102-ls-tree-wildcards.sh
index 1e16c6b8ea6..3942db22900 100755
--- a/t/t3102-ls-tree-wildcards.sh
+++ b/t/t3102-ls-tree-wildcards.sh
@@ -2,6 +2,7 @@
 
 test_description='ls-tree with(out) globs'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t3103-ls-tree-misc.sh b/t/t3103-ls-tree-misc.sh
index 14520913afc..d18ba1bd84b 100755
--- a/t/t3103-ls-tree-misc.sh
+++ b/t/t3103-ls-tree-misc.sh
@@ -7,6 +7,7 @@ Miscellaneous tests for git ls-tree.
 
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 4/9] leak tests: mark all trace2 tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (2 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 3/9] leak tests: mark all ls-tree tests as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 5/9] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
                     ` (4 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark all tests that match "*trace2*" 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>
---
 t/t0210-trace2-normal.sh | 2 ++
 t/t0211-trace2-perf.sh   | 2 ++
 t/t0212-trace2-event.sh  | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/t/t0210-trace2-normal.sh b/t/t0210-trace2-normal.sh
index 0cf3a63b75b..37c359bd5a2 100755
--- a/t/t0210-trace2-normal.sh
+++ b/t/t0210-trace2-normal.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility (normal target)'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
diff --git a/t/t0211-trace2-perf.sh b/t/t0211-trace2-perf.sh
index 6ee8ee3b672..22d0845544e 100755
--- a/t/t0211-trace2-perf.sh
+++ b/t/t0211-trace2-perf.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility (perf target)'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
diff --git a/t/t0212-trace2-event.sh b/t/t0212-trace2-event.sh
index 1529155cf01..6d3374ff773 100755
--- a/t/t0212-trace2-event.sh
+++ b/t/t0212-trace2-event.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test trace2 facility'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 # Turn off any inherited trace2 settings for this test.
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 5/9] leak tests: mark all checkout-index tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (3 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 4/9] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 6/9] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
                     ` (3 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*{checkout,switch}*" 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).

Unfortunately almost all of those tests fail when compiled with
SANITIZE=leak, these only pass because they run "checkout-index", not
the main "checkout" command.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t2002-checkout-cache-u.sh             | 1 +
 t/t2003-checkout-cache-mkdir.sh         | 1 +
 t/t2004-checkout-cache-temp.sh          | 1 +
 t/t2005-checkout-index-symlinks.sh      | 1 +
 t/t2081-parallel-checkout-collisions.sh | 1 +
 5 files changed, 5 insertions(+)

diff --git a/t/t2002-checkout-cache-u.sh b/t/t2002-checkout-cache-u.sh
index 70361c806e1..fc95cf90485 100755
--- a/t/t2002-checkout-cache-u.sh
+++ b/t/t2002-checkout-cache-u.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index -u test.
 With -u flag, git checkout-index internally runs the equivalent of
 git update-index --refresh on the checked out entry.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh
index ff163cf6750..f0fd441d810 100755
--- a/t/t2003-checkout-cache-mkdir.sh
+++ b/t/t2003-checkout-cache-mkdir.sh
@@ -10,6 +10,7 @@ also verifies that such leading path may contain symlinks, unlike
 the GIT controlled paths.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index a9352b08a8b..9bb503a9757 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index --temp test.
 With --temp flag, git checkout-index writes to temporary merge files
 rather than the tracked path.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup' '
diff --git a/t/t2005-checkout-index-symlinks.sh b/t/t2005-checkout-index-symlinks.sh
index 9fa56104743..112682a45a1 100755
--- a/t/t2005-checkout-index-symlinks.sh
+++ b/t/t2005-checkout-index-symlinks.sh
@@ -8,6 +8,7 @@ test_description='git checkout-index on filesystem w/o symlinks test.
 This tests that git checkout-index creates a symbolic link as a plain
 file if core.symlinks is false.'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t2081-parallel-checkout-collisions.sh b/t/t2081-parallel-checkout-collisions.sh
index f6fcfc0c1e4..6acdb89d12b 100755
--- a/t/t2081-parallel-checkout-collisions.sh
+++ b/t/t2081-parallel-checkout-collisions.sh
@@ -11,6 +11,7 @@ The tests in this file exercise parallel checkout's collision detection code in
 both these mechanics.
 "
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY/lib-parallel-checkout.sh"
 
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 6/9] leak tests: mark some ls-files tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (4 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 5/9] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 7/9] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
                     ` (2 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*ls-files*" 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). We still have others that match '*ls-files*" that fail
under SANITIZE=leak.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t3000-ls-files-others.sh              | 2 ++
 t/t3002-ls-files-dashpath.sh            | 2 ++
 t/t3003-ls-files-exclude.sh             | 2 ++
 t/t3004-ls-files-basic.sh               | 1 +
 t/t3006-ls-files-long.sh                | 2 ++
 t/t3008-ls-files-lazy-init-name-hash.sh | 1 +
 6 files changed, 10 insertions(+)

diff --git a/t/t3000-ls-files-others.sh b/t/t3000-ls-files-others.sh
index 740ce56eab5..11af4552f74 100755
--- a/t/t3000-ls-files-others.sh
+++ b/t/t3000-ls-files-others.sh
@@ -15,6 +15,8 @@ filesystem.
     path3/file3 - a file in a directory
     path4       - an empty directory
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'setup ' '
diff --git a/t/t3002-ls-files-dashpath.sh b/t/t3002-ls-files-dashpath.sh
index 8704b04e1b4..54d22a45dfb 100755
--- a/t/t3002-ls-files-dashpath.sh
+++ b/t/t3002-ls-files-dashpath.sh
@@ -12,6 +12,8 @@ filesystem.
     -foo	- a file with a funny name.
     --		- another file with a funny name.
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success \
diff --git a/t/t3003-ls-files-exclude.sh b/t/t3003-ls-files-exclude.sh
index c41c4f046ab..7933dff9b38 100755
--- a/t/t3003-ls-files-exclude.sh
+++ b/t/t3003-ls-files-exclude.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='ls-files --exclude does not affect index files'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create repo with file' '
diff --git a/t/t3004-ls-files-basic.sh b/t/t3004-ls-files-basic.sh
index 9fd5a1f188a..a16e25c79bd 100755
--- a/t/t3004-ls-files-basic.sh
+++ b/t/t3004-ls-files-basic.sh
@@ -6,6 +6,7 @@ This test runs git ls-files with various unusual or malformed
 command-line arguments.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'ls-files in empty repository' '
diff --git a/t/t3006-ls-files-long.sh b/t/t3006-ls-files-long.sh
index e109c3fbfb5..2aaf91ebc8c 100755
--- a/t/t3006-ls-files-long.sh
+++ b/t/t3006-ls-files-long.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='overly long paths'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t3008-ls-files-lazy-init-name-hash.sh b/t/t3008-ls-files-lazy-init-name-hash.sh
index 85f37049587..51d3dffaa66 100755
--- a/t/t3008-ls-files-lazy-init-name-hash.sh
+++ b/t/t3008-ls-files-lazy-init-name-hash.sh
@@ -2,6 +2,7 @@
 
 test_description='Test the lazy init name hash with various folder structures'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 if test 1 -eq $(test-tool online-cpus)
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 7/9] leak tests: mark some read-tree tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (5 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 6/9] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 8/9] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 9/9] leak tests: mark some misc " Ævar Arnfjörð Bjarmason
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*read-tree*" 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). We still have around half the tests that match
"*read-tree*" failing, but let's whitelist those that don't.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t1000-read-tree-m-3way.sh    | 2 ++
 t/t1003-read-tree-prefix.sh    | 1 +
 t/t1009-read-tree-new-index.sh | 1 +
 t/t1012-read-tree-df.sh        | 1 +
 t/t1014-read-tree-confusing.sh | 2 ++
 5 files changed, 7 insertions(+)

diff --git a/t/t1000-read-tree-m-3way.sh b/t/t1000-read-tree-m-3way.sh
index 013c5a7bc32..0e8c0dfbbee 100755
--- a/t/t1000-read-tree-m-3way.sh
+++ b/t/t1000-read-tree-m-3way.sh
@@ -71,6 +71,8 @@ In addition:
  DF: a special case, where A makes a directory and B makes a file.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
diff --git a/t/t1003-read-tree-prefix.sh b/t/t1003-read-tree-prefix.sh
index b6111cd150f..e0db2066f31 100755
--- a/t/t1003-read-tree-prefix.sh
+++ b/t/t1003-read-tree-prefix.sh
@@ -6,6 +6,7 @@
 test_description='git read-tree --prefix test.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t1009-read-tree-new-index.sh b/t/t1009-read-tree-new-index.sh
index 2935f68f8d2..fc179ac5dd6 100755
--- a/t/t1009-read-tree-new-index.sh
+++ b/t/t1009-read-tree-new-index.sh
@@ -5,6 +5,7 @@ test_description='test read-tree into a fresh index file'
 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 '
diff --git a/t/t1012-read-tree-df.sh b/t/t1012-read-tree-df.sh
index 57f0770df14..cde93d22cde 100755
--- a/t/t1012-read-tree-df.sh
+++ b/t/t1012-read-tree-df.sh
@@ -2,6 +2,7 @@
 
 test_description='read-tree D/F conflict corner cases'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-read-tree.sh
 
diff --git a/t/t1014-read-tree-confusing.sh b/t/t1014-read-tree-confusing.sh
index da3376b3bb2..8ea8d36818b 100755
--- a/t/t1014-read-tree-confusing.sh
+++ b/t/t1014-read-tree-confusing.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='check that read-tree rejects confusing paths'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'create base tree' '
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 8/9] leak tests: mark various "generic" tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (6 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 7/9] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  2021-10-12 13:56   ` [PATCH v2 9/9] leak tests: mark some misc " Ævar Arnfjörð Bjarmason
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

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>
---
 t/t1430-bad-ref-name.sh       | 1 +
 t/t1504-ceiling-dirs.sh       | 2 ++
 t/t1510-repo-setup.sh         | 1 +
 t/t2050-git-dir-relative.sh   | 1 +
 t/t2300-cd-to-toplevel.sh     | 1 +
 t/t3070-wildmatch.sh          | 1 +
 t/t3205-branch-color.sh       | 1 +
 t/t3211-peel-ref.sh           | 1 +
 t/t3300-funny-names.sh        | 1 +
 t/t3902-quoted.sh             | 1 +
 t/t4026-color.sh              | 2 ++
 t/t5580-unc-paths.sh          | 1 +
 t/t5615-alternate-env.sh      | 2 ++
 t/t7518-ident-corner-cases.sh | 2 ++
 14 files changed, 18 insertions(+)

diff --git a/t/t1430-bad-ref-name.sh b/t/t1430-bad-ref-name.sh
index fa3aeb80f2c..4c77cf89a6c 100755
--- a/t/t1430-bad-ref-name.sh
+++ b/t/t1430-bad-ref-name.sh
@@ -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 '
diff --git a/t/t1504-ceiling-dirs.sh b/t/t1504-ceiling-dirs.sh
index 3d51615e42d..0fafcf9dde3 100755
--- a/t/t1504-ceiling-dirs.sh
+++ b/t/t1504-ceiling-dirs.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='test GIT_CEILING_DIRECTORIES'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_prefix() {
diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh
index bbfe05b8e4a..591505a39c0 100755
--- a/t/t1510-repo-setup.sh
+++ b/t/t1510-repo-setup.sh
@@ -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)
diff --git a/t/t2050-git-dir-relative.sh b/t/t2050-git-dir-relative.sh
index 21f4659a9d1..1f193cde965 100755
--- a/t/t2050-git-dir-relative.sh
+++ b/t/t2050-git-dir-relative.sh
@@ -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"
diff --git a/t/t2300-cd-to-toplevel.sh b/t/t2300-cd-to-toplevel.sh
index c8de6d8a190..b40eeb263fe 100755
--- a/t/t2300-cd-to-toplevel.sh
+++ b/t/t2300-cd-to-toplevel.sh
@@ -2,6 +2,7 @@
 
 test_description='cd_to_toplevel'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 EXEC_PATH="$(git --exec-path)"
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh
index 56ea4bda133..72d5b014d82 100755
--- a/t/t3070-wildmatch.sh
+++ b/t/t3070-wildmatch.sh
@@ -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
diff --git a/t/t3205-branch-color.sh b/t/t3205-branch-color.sh
index 08bd906173b..6a521c1a3e5 100755
--- a/t/t3205-branch-color.sh
+++ b/t/t3205-branch-color.sh
@@ -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' '
diff --git a/t/t3211-peel-ref.sh b/t/t3211-peel-ref.sh
index 37b9d26f4b6..9cbc34fc583 100755
--- a/t/t3211-peel-ref.sh
+++ b/t/t3211-peel-ref.sh
@@ -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' '
diff --git a/t/t3300-funny-names.sh b/t/t3300-funny-names.sh
index f5bf16abcd8..d3ac826283e 100755
--- a/t/t3300-funny-names.sh
+++ b/t/t3300-funny-names.sh
@@ -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='	'
diff --git a/t/t3902-quoted.sh b/t/t3902-quoted.sh
index f528008c363..72a5a565e97 100755
--- a/t/t3902-quoted.sh
+++ b/t/t3902-quoted.sh
@@ -5,6 +5,7 @@
 
 test_description='quoted output'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 FN='濱野'
diff --git a/t/t4026-color.sh b/t/t4026-color.sh
index c0b642c1ab0..cc73161b466 100755
--- a/t/t4026-color.sh
+++ b/t/t4026-color.sh
@@ -4,6 +4,8 @@
 #
 
 test_description='Test diff/status color escape codes'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 ESC=$(printf '\033')
diff --git a/t/t5580-unc-paths.sh b/t/t5580-unc-paths.sh
index cd803ae8bf1..cd7604fff93 100755
--- a/t/t5580-unc-paths.sh
+++ b/t/t5580-unc-paths.sh
@@ -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
diff --git a/t/t5615-alternate-env.sh b/t/t5615-alternate-env.sh
index b4905b822c0..83513e46a35 100755
--- a/t/t5615-alternate-env.sh
+++ b/t/t5615-alternate-env.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='handling of alternates in environment variables'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 check_obj () {
diff --git a/t/t7518-ident-corner-cases.sh b/t/t7518-ident-corner-cases.sh
index 905957bd0a1..fffdb6ff2e7 100755
--- a/t/t7518-ident-corner-cases.sh
+++ b/t/t7518-ident-corner-cases.sh
@@ -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
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 9/9] leak tests: mark some misc tests as passing with SANITIZE=leak
  2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
                     ` (7 preceding siblings ...)
  2021-10-12 13:56   ` [PATCH v2 8/9] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
@ 2021-10-12 13:56   ` Ævar Arnfjörð Bjarmason
  8 siblings, 0 replies; 27+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-10-12 13:56 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Elijah Newren, Martin Ågren, Andrzej Hunt,
	Jeff King, Ævar Arnfjörð Bjarmason

Mark some tests that match "*{mktree,commit,diff,grep,rm,merge,hunk}*"
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).

These were picked because we still have a lot of failures in adjacent
areas, and we didn't have much if any coverage of e.g. grep and diff
before this change, we could still whitelist a lot more tests, but
let's stop for now.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/t1010-mktree.sh              | 1 +
 t/t1100-commit-tree-options.sh | 1 +
 t/t3601-rm-pathspec-file.sh    | 1 +
 t/t4002-diff-basic.sh          | 2 ++
 t/t4016-diff-quote.sh          | 1 +
 t/t4019-diff-wserror.sh        | 1 +
 t/t4025-hunk-header.sh         | 1 +
 t/t4300-merge-tree.sh          | 2 ++
 t/t7813-grep-icase-iso.sh      | 1 +
 t/t7816-grep-binary-pattern.sh | 1 +
 10 files changed, 12 insertions(+)

diff --git a/t/t1010-mktree.sh b/t/t1010-mktree.sh
index b946f876864..48bfad07abc 100755
--- a/t/t1010-mktree.sh
+++ b/t/t1010-mktree.sh
@@ -2,6 +2,7 @@
 
 test_description='git mktree'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh
index ae66ba5babf..0f37a43fd3c 100755
--- a/t/t1100-commit-tree-options.sh
+++ b/t/t1100-commit-tree-options.sh
@@ -12,6 +12,7 @@ Also make sure that command line parser understands the normal
 "flags first and then non flag arguments" command line.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 cat >expected <<EOF
diff --git a/t/t3601-rm-pathspec-file.sh b/t/t3601-rm-pathspec-file.sh
index 7de21f8bcff..b2a8db69afc 100755
--- a/t/t3601-rm-pathspec-file.sh
+++ b/t/t3601-rm-pathspec-file.sh
@@ -2,6 +2,7 @@
 
 test_description='rm --pathspec-from-file'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_tick
diff --git a/t/t4002-diff-basic.sh b/t/t4002-diff-basic.sh
index 6a9f010197c..ea52e5b91b7 100755
--- a/t/t4002-diff-basic.sh
+++ b/t/t4002-diff-basic.sh
@@ -6,6 +6,8 @@
 test_description='Test diff raw-output.
 
 '
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 . "$TEST_DIRECTORY"/lib-read-tree-m-3way.sh
diff --git a/t/t4016-diff-quote.sh b/t/t4016-diff-quote.sh
index 876271d6826..5a8d8876831 100755
--- a/t/t4016-diff-quote.sh
+++ b/t/t4016-diff-quote.sh
@@ -6,6 +6,7 @@
 test_description='Quoting paths in diff output.
 '
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 P0='pathname'
diff --git a/t/t4019-diff-wserror.sh b/t/t4019-diff-wserror.sh
index c6135c75488..c68729ac098 100755
--- a/t/t4019-diff-wserror.sh
+++ b/t/t4019-diff-wserror.sh
@@ -2,6 +2,7 @@
 
 test_description='diff whitespace error detection'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t4025-hunk-header.sh b/t/t4025-hunk-header.sh
index 35578f2bb91..6356961de46 100755
--- a/t/t4025-hunk-header.sh
+++ b/t/t4025-hunk-header.sh
@@ -2,6 +2,7 @@
 
 test_description='diff hunk header truncation'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 N='日本語'
diff --git a/t/t4300-merge-tree.sh b/t/t4300-merge-tree.sh
index e59601e5fe9..c52c8a21fae 100755
--- a/t/t4300-merge-tree.sh
+++ b/t/t4300-merge-tree.sh
@@ -4,6 +4,8 @@
 #
 
 test_description='git merge-tree'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success setup '
diff --git a/t/t7813-grep-icase-iso.sh b/t/t7813-grep-icase-iso.sh
index 701e08a8e59..1227885737b 100755
--- a/t/t7813-grep-icase-iso.sh
+++ b/t/t7813-grep-icase-iso.sh
@@ -2,6 +2,7 @@
 
 test_description='grep icase on non-English locales'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 test_expect_success GETTEXT_ISO_LOCALE 'setup' '
diff --git a/t/t7816-grep-binary-pattern.sh b/t/t7816-grep-binary-pattern.sh
index 9d67a5fc4cf..fdb2355649e 100755
--- a/t/t7816-grep-binary-pattern.sh
+++ b/t/t7816-grep-binary-pattern.sh
@@ -2,6 +2,7 @@
 
 test_description='git grep with a binary pattern files'
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./lib-gettext.sh
 
 nul_match_internal () {
-- 
2.33.0.1567.g7b23ce7ed9e


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2021-10-12 13:57 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-06  9:50 [PATCH 00/10] leak tests: mark more tests as passing Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 01/10] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
2021-10-07 22:33   ` Junio C Hamano
2021-10-06  9:50 ` [PATCH 02/10] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 03/10] leak tests: mark t0000-init.sh as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
2021-10-07 22:35   ` Junio C Hamano
2021-10-12 13:39     ` Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 04/10] leak tests: mark all ls-tree tests " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 05/10] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 06/10] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 07/10] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 08/10] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 09/10] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
2021-10-06  9:50 ` [PATCH 10/10] leak tests: mark some misc " Ævar Arnfjörð Bjarmason
2021-10-06 16:26 ` [PATCH 00/10] leak tests: mark more tests as passing Elijah Newren
2021-10-07 22:38   ` Junio C Hamano
2021-10-12 13:40   ` Ævar Arnfjörð Bjarmason
2021-10-12 13:56 ` [PATCH v2 0/9] " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 1/9] leak tests: run various built-in tests in t00*.sh SANITIZE=leak Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 2/9] leak tests: run various "test-tool" " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 3/9] leak tests: mark all ls-tree tests as passing with SANITIZE=leak Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 4/9] leak tests: mark all trace2 " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 5/9] leak tests: mark all checkout-index " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 6/9] leak tests: mark some ls-files " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 7/9] leak tests: mark some read-tree " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 8/9] leak tests: mark various "generic" " Ævar Arnfjörð Bjarmason
2021-10-12 13:56   ` [PATCH v2 9/9] leak tests: mark some misc " Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).