git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] leak tests: mark a handful of tests as leak-free

From
Taylor Blau <me@ttaylorr.com>
Date
Aug 24, 2023, 18:40 UTC
Message-ID
<b1711c4c817f95011bc477a9485c115b4926c7da.1692902414.git.me@ttaylorr.com>
In-Reply-To
<cover.1692902414.git.me@ttaylorr.com>

In the topic merged via 5a4f8381b6 (Merge branch 'ab/mark-leak-free-tests', 2021-10-25), a handful of tests in the suite were marked as leak-free.

As far as I can tell, each patch from that series ran tests from a handful of subject areas, such as "some ls-files tests", or "all trace2 tests". This left some gaps in which tests had and hadn't been audited to be leak-free.

This patch closes those gaps by exporting TEST_PASSES_SANITIZE_LEAK=true before sourcing t/test-lib.sh on most remaining leak-free tests. This list was compiled by doing:

    $ make SANITIZE=leak
    $ make \
        GIT_TEST_PASSING_SANITIZE_LEAK=check \
        GIT_TEST_SANITIZE_LEAK_LOG=true \
        GIT_TEST_OPTS=-vi test
and looking through the list of failing tests in the output.

There are a couple of other tests which are similarly leak-free, but not included in the list of tests touched by this patch. The remaining tests will be addressed in the subsequent two patches.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 t/t5571-pre-push-hook.sh | 1 +
 t/t7516-commit-races.sh  | 2 ++
 2 files changed, 3 insertions(+)
diff --git a/t/t5571-pre-push-hook.sh b/t/t5571-pre-push-hook.sh
index a11b20e378..448134c4bf 100755
--- a/t/t5571-pre-push-hook.sh
+++ b/t/t5571-pre-push-hook.sh
@@ -4,6 +4,7 @@ test_description='check pre-push hooks'
 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/t7516-commit-races.sh b/t/t7516-commit-races.sh
index 2d38a16480..bb95f09810 100755
--- a/t/t7516-commit-races.sh
+++ b/t/t7516-commit-races.sh
@@ -1,6 +1,8 @@
 #!/bin/sh
 
 test_description='git commit races'
+
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'race to create orphan commit' '
-- 
2.42.0.3.g4011eb6a8b
Previous: Taylor BlauNext: Jeff King
Message 3 of 21 in “leak tests: mark remaining tests leak-free as such”
  1. 0/3 leak tests: mark remaining tests leak-free as suchTaylor Blau, Aug 24, 2023
  2. 2/3 leak tests: mark t3321-notes-stripspace.sh as leak-freeTaylor Blau, Aug 24, 2023
  3. 1/3 leak tests: mark a handful of tests as leak-freeTaylor Blau, Aug 24, 2023
  4. Jeff KingAug 24, 2023
  5. Taylor BlauAug 25, 2023
  6. Jeff KingAug 25, 2023
  7. Junio C HamanoAug 28, 2023
  8. test-lib: ignore uninteresting LSan outputJeff King, Aug 28, 2023
  9. 3/3 leak tests: mark t5583-push-branches.sh as leak-freeTaylor Blau, Aug 24, 2023
  10. Junio C HamanoAug 24, 2023
  11. Jeff KingAug 24, 2023
  12. Jeff KingAug 24, 2023
  13. Taylor BlauAug 25, 2023
  14. Jeff KingAug 25, 2023
  15. 0/4 leak tests: mark remaining tests leak-free as suchTaylor Blau, Aug 28, 2023
  16. 2/4 leak tests: mark a handful of tests as leak-freeTaylor Blau, Aug 28, 2023
  17. 4/4 leak tests: mark t5583-push-branches.sh as leak-freeTaylor Blau, Aug 28, 2023
  18. 3/4 leak tests: mark t3321-notes-stripspace.sh as leak-freeTaylor Blau, Aug 28, 2023
  19. 1/4 test-lib: ignore uninteresting LSan outputTaylor Blau, Aug 28, 2023
  20. Jeff KingAug 29, 2023
  21. Junio C HamanoAug 29, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.