{"thread":{"id":"57606","subject":"[PATCH] leak tests: mark passing SANITIZE=leak tests as leak-free","startedAt":"2022-03-23T20:39:38Z","lastAt":"2022-03-23T20:39:38Z","messageCount":1,"participants":["Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"452060","messageId":"patch-1.1-45f76fbd8c5-20220323T203725Z-avarab@gmail.com","threadId":"57606","inReplyTo":null,"subject":"[PATCH] leak tests: mark passing SANITIZE=leak tests as leak-free","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-03-23T20:39:31Z","receivedAt":"2022-03-23T20:39:38Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Mark those remaining tests that pass when run under SANITIZE=leak with\nTEST_PASSES_SANITIZE_LEAK=true, these were either omitted in\nf346fcb62a0 (Merge branch 'ab/mark-leak-free-tests-even-more',\n2021-12-15) and 5a4f8381b68 (Merge branch 'ab/mark-leak-free-tests',\n2021-10-25), or have had their memory leaks fixed since then.\n\nWith this change there's almost a 1=1 mapping between those tests that\nare marked to run with \"GIT_TEST_PASSING_SANITIZE_LEAK=true\", and\nthose that we have opted-in via \"TEST_PASSES_SANITIZE_LEAK=true\".\n\nThe few exceptions to that are due to \"false positive\" passes having\nto do with us reporting the tests as passing, but them having\nunreported memory leaks for various reasons (exit codes not being\nretained). Those will be addressed in follow-up work, for now let's\nopt-in the straightforward cases.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nA straightforward change to opt-in various tests that currently aren't\nrun under the SANITIZE=leak CI mode for whatever reason.\n\nTo the extent that opting-tests in has been painful, it's about to\nbecome a lot easier due to my parallel series to add a\nrevisions_release():\nhttps://lore.kernel.org/git/cover-v2-00.27-00000000000-20220323T203149Z-avarab@gmail.com/\n\nBut this small patch is orthagonal to that, and can proceed\nindependently.\n\n t/t0027-auto-crlf.sh                 | 1 +\n t/t0032-reftable-unittest.sh         | 1 +\n t/t0050-filesystem.sh                | 1 +\n t/t1405-main-ref-store.sh            | 1 +\n t/t2006-checkout-index-basic.sh      | 1 +\n t/t2023-checkout-m.sh                | 1 +\n t/t3012-ls-files-dedup.sh            | 1 +\n t/t4017-diff-retval.sh               | 1 +\n t/t4021-format-patch-numbered.sh     | 1 +\n t/t4028-format-patch-mime-headers.sh | 2 ++\n t/t4036-format-patch-signer-mime.sh  | 1 +\n t/t4057-diff-combined-paths.sh       | 1 +\n t/t4122-apply-symlink-inside.sh      | 1 +\n t/t5315-pack-objects-compression.sh  | 1 +\n t/t5402-post-merge-hook.sh           | 1 +\n t/t6404-recursive-merge.sh           | 1 +\n t/t6405-merge-symlinks.sh            | 1 +\n t/t6408-merge-up-to-date.sh          | 1 +\n t/t6411-merge-filemode.sh            | 1 +\n t/t6413-merge-crlf.sh                | 1 +\n t/t6415-merge-dir-to-symlink.sh      | 1 +\n t/t6425-merge-rename-delete.sh       | 1 +\n t/t6431-merge-criscross.sh           | 1 +\n t/t7060-wtstatus.sh                  | 1 +\n t/t7062-wtstatus-ignorecase.sh       | 1 +\n t/t7110-reset-merge.sh               | 1 +\n t/t7111-reset-table.sh               | 1 +\n t/t9001-send-email.sh                | 1 +\n t/t9901-git-web--browse.sh           | 1 +\n 29 files changed, 30 insertions(+)\n\ndiff --git a/t/t0027-auto-crlf.sh b/t/t0027-auto-crlf.sh\nindex c5f7ac63b0a..38815f48acd 100755\n--- a/t/t0027-auto-crlf.sh\n+++ b/t/t0027-auto-crlf.sh\n@@ -2,6 +2,7 @@\n \n test_description='CRLF conversion all combinations'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n compare_files () {\ndiff --git a/t/t0032-reftable-unittest.sh b/t/t0032-reftable-unittest.sh\nindex 0ed14971a58..471cb37ac28 100755\n--- a/t/t0032-reftable-unittest.sh\n+++ b/t/t0032-reftable-unittest.sh\n@@ -5,6 +5,7 @@\n \n test_description='reftable unittests'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'unittests' '\ndiff --git a/t/t0050-filesystem.sh b/t/t0050-filesystem.sh\nindex afc343cf9bb..24f0075233f 100755\n--- a/t/t0050-filesystem.sh\n+++ b/t/t0050-filesystem.sh\n@@ -5,6 +5,7 @@ test_description='Various filesystem issues'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n auml=$(printf '\\303\\244')\ndiff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh\nindex 51f82916281..e4627cf1b61 100755\n--- a/t/t1405-main-ref-store.sh\n+++ b/t/t1405-main-ref-store.sh\n@@ -5,6 +5,7 @@ test_description='test main ref store api'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n RUN=\"test-tool ref-store main\"\ndiff --git a/t/t2006-checkout-index-basic.sh b/t/t2006-checkout-index-basic.sh\nindex 7705e3a3170..5d119871d41 100755\n--- a/t/t2006-checkout-index-basic.sh\n+++ b/t/t2006-checkout-index-basic.sh\n@@ -3,6 +3,7 @@\n test_description='basic checkout-index tests\n '\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'checkout-index --gobbledegook' '\ndiff --git a/t/t2023-checkout-m.sh b/t/t2023-checkout-m.sh\nindex 7b327b75449..81e772fb4eb 100755\n--- a/t/t2023-checkout-m.sh\n+++ b/t/t2023-checkout-m.sh\n@@ -7,6 +7,7 @@ Ensures that checkout -m on a resolved file restores the conflicted file'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t3012-ls-files-dedup.sh b/t/t3012-ls-files-dedup.sh\nindex 2682b1f43a6..190e2f6eed7 100755\n--- a/t/t3012-ls-files-dedup.sh\n+++ b/t/t3012-ls-files-dedup.sh\n@@ -2,6 +2,7 @@\n \n test_description='git ls-files --deduplicate test'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh\nindex ed461f481e2..5bc28ad9f04 100755\n--- a/t/t4017-diff-retval.sh\n+++ b/t/t4017-diff-retval.sh\n@@ -5,6 +5,7 @@ test_description='Return value of diffs'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t4021-format-patch-numbered.sh b/t/t4021-format-patch-numbered.sh\nindex 9be65fd4440..1219aa226dc 100755\n--- a/t/t4021-format-patch-numbered.sh\n+++ b/t/t4021-format-patch-numbered.sh\n@@ -5,6 +5,7 @@\n \n test_description='Format-patch numbering options'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t4028-format-patch-mime-headers.sh b/t/t4028-format-patch-mime-headers.sh\nindex 204ba673cb5..60cb819c42e 100755\n--- a/t/t4028-format-patch-mime-headers.sh\n+++ b/t/t4028-format-patch-mime-headers.sh\n@@ -1,6 +1,8 @@\n #!/bin/sh\n \n test_description='format-patch mime headers and extra headers do not conflict'\n+\n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'create commit with utf-8 body' '\ndiff --git a/t/t4036-format-patch-signer-mime.sh b/t/t4036-format-patch-signer-mime.sh\nindex 98d9713d8b2..48655bcc789 100755\n--- a/t/t4036-format-patch-signer-mime.sh\n+++ b/t/t4036-format-patch-signer-mime.sh\n@@ -2,6 +2,7 @@\n \n test_description='format-patch -s should force MIME encoding as needed'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t4057-diff-combined-paths.sh b/t/t4057-diff-combined-paths.sh\nindex 04b8a1542a8..9a7505cbb8b 100755\n--- a/t/t4057-diff-combined-paths.sh\n+++ b/t/t4057-diff-combined-paths.sh\n@@ -5,6 +5,7 @@ test_description='combined diff show only paths that are different to all parent\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n # verify that diffc.expect matches output of\ndiff --git a/t/t4122-apply-symlink-inside.sh b/t/t4122-apply-symlink-inside.sh\nindex aa52de401b9..96965373036 100755\n--- a/t/t4122-apply-symlink-inside.sh\n+++ b/t/t4122-apply-symlink-inside.sh\n@@ -4,6 +4,7 @@ test_description='apply to deeper directory without getting fooled with symlink'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5315-pack-objects-compression.sh b/t/t5315-pack-objects-compression.sh\nindex 8bacd96275b..c80ea9e8b71 100755\n--- a/t/t5315-pack-objects-compression.sh\n+++ b/t/t5315-pack-objects-compression.sh\n@@ -2,6 +2,7 @@\n \n test_description='pack-object compression configuration'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t5402-post-merge-hook.sh b/t/t5402-post-merge-hook.sh\nindex 3e5e19c7191..8697154983f 100755\n--- a/t/t5402-post-merge-hook.sh\n+++ b/t/t5402-post-merge-hook.sh\n@@ -7,6 +7,7 @@ test_description='Test the post-merge hook.'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6404-recursive-merge.sh b/t/t6404-recursive-merge.sh\nindex b8735c6db4d..36215518b6e 100755\n--- a/t/t6404-recursive-merge.sh\n+++ b/t/t6404-recursive-merge.sh\n@@ -4,6 +4,7 @@ test_description='Test merge without common ancestors'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n # This scenario is based on a real-world repository of Shawn Pearce.\ndiff --git a/t/t6405-merge-symlinks.sh b/t/t6405-merge-symlinks.sh\nindex 7435fce71e0..29e2b25ce5d 100755\n--- a/t/t6405-merge-symlinks.sh\n+++ b/t/t6405-merge-symlinks.sh\n@@ -11,6 +11,7 @@ if core.symlinks is false.'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'setup' '\ndiff --git a/t/t6408-merge-up-to-date.sh b/t/t6408-merge-up-to-date.sh\nindex 7763c1ba980..8a1ba6d23a7 100755\n--- a/t/t6408-merge-up-to-date.sh\n+++ b/t/t6408-merge-up-to-date.sh\n@@ -2,6 +2,7 @@\n \n test_description='merge fast-forward and up to date'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6411-merge-filemode.sh b/t/t6411-merge-filemode.sh\nindex 6ae2489286c..b6182723aae 100755\n--- a/t/t6411-merge-filemode.sh\n+++ b/t/t6411-merge-filemode.sh\n@@ -4,6 +4,7 @@ test_description='merge: handle file mode'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'set up mode change in one branch' '\ndiff --git a/t/t6413-merge-crlf.sh b/t/t6413-merge-crlf.sh\nindex affea255fe9..b4f4a313f48 100755\n--- a/t/t6413-merge-crlf.sh\n+++ b/t/t6413-merge-crlf.sh\n@@ -11,6 +11,7 @@ test_description='merge conflict in crlf repo\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t6415-merge-dir-to-symlink.sh b/t/t6415-merge-dir-to-symlink.sh\nindex 2655e295f5a..ae00492c768 100755\n--- a/t/t6415-merge-dir-to-symlink.sh\n+++ b/t/t6415-merge-dir-to-symlink.sh\n@@ -4,6 +4,7 @@ test_description='merging when a directory was replaced with a symlink'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'create a commit where dir a/b changed to symlink' '\ndiff --git a/t/t6425-merge-rename-delete.sh b/t/t6425-merge-rename-delete.sh\nindex 459b431a60d..93cd2869b12 100755\n--- a/t/t6425-merge-rename-delete.sh\n+++ b/t/t6425-merge-rename-delete.sh\n@@ -4,6 +4,7 @@ test_description='Merge-recursive rename/delete conflict message'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'rename/delete' '\ndiff --git a/t/t6431-merge-criscross.sh b/t/t6431-merge-criscross.sh\nindex 3824756a02e..3fe14cd73e8 100755\n--- a/t/t6431-merge-criscross.sh\n+++ b/t/t6431-merge-criscross.sh\n@@ -2,6 +2,7 @@\n \n test_description='merge-recursive backend test'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n #         A      <- create some files\ndiff --git a/t/t7060-wtstatus.sh b/t/t7060-wtstatus.sh\nindex 0f4344c55e6..aaeb4a53344 100755\n--- a/t/t7060-wtstatus.sh\n+++ b/t/t7060-wtstatus.sh\n@@ -5,6 +5,7 @@ test_description='basic work tree status reporting'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t7062-wtstatus-ignorecase.sh b/t/t7062-wtstatus-ignorecase.sh\nindex 73709dbeee2..caf372a3d42 100755\n--- a/t/t7062-wtstatus-ignorecase.sh\n+++ b/t/t7062-wtstatus-ignorecase.sh\n@@ -2,6 +2,7 @@\n \n test_description='git-status with core.ignorecase=true'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success 'status with hash collisions' '\ndiff --git a/t/t7110-reset-merge.sh b/t/t7110-reset-merge.sh\nindex 3d62e10b53f..eb881be95b6 100755\n--- a/t/t7110-reset-merge.sh\n+++ b/t/t7110-reset-merge.sh\n@@ -5,6 +5,7 @@\n \n test_description='Tests for \"git reset\" with \"--merge\" and \"--keep\" options'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_expect_success setup '\ndiff --git a/t/t7111-reset-table.sh b/t/t7111-reset-table.sh\nindex ce421ad5ac4..78f25c1c7ea 100755\n--- a/t/t7111-reset-table.sh\n+++ b/t/t7111-reset-table.sh\n@@ -5,6 +5,7 @@\n \n test_description='Tests to check that \"reset\" options follow a known table'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n \ndiff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh\nindex 84d0f40d76a..dfa6b20f7a6 100755\n--- a/t/t9001-send-email.sh\n+++ b/t/t9001-send-email.sh\n@@ -4,6 +4,7 @@ test_description='git send-email'\n GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main\n export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n # May be altered later in the test\ndiff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh\nindex de7152f8271..19f56e5680f 100755\n--- a/t/t9901-git-web--browse.sh\n+++ b/t/t9901-git-web--browse.sh\n@@ -5,6 +5,7 @@ test_description='git web--browse basic tests\n \n This test checks that git web--browse can handle various valid URLs.'\n \n+TEST_PASSES_SANITIZE_LEAK=true\n . ./test-lib.sh\n \n test_web_browse () {\n-- \n2.35.1.1452.ga7cfc89151f\n\n"}]}