git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Teng Long" <dyroneteng@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 1/3] leak tests: mark a handful of tests as leak-free
Date: Thu, 24 Aug 2023 14:40:38 -0400	[thread overview]
Message-ID: <b1711c4c817f95011bc477a9485c115b4926c7da.1692902414.git.me@ttaylorr.com> (raw)
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


  reply	other threads:[~2023-08-24 18:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 18:40 [PATCH 0/3] leak tests: mark remaining tests leak-free as such Taylor Blau
2023-08-24 18:40 ` Taylor Blau [this message]
2023-08-24 21:02   ` [PATCH 1/3] leak tests: mark a handful of tests as leak-free Jeff King
2023-08-25 19:05     ` Taylor Blau
2023-08-25 20:38       ` Jeff King
2023-08-28 18:24         ` Junio C Hamano
2023-08-28 18:37           ` [PATCH] test-lib: ignore uninteresting LSan output Jeff King
2023-08-24 18:40 ` [PATCH 2/3] leak tests: mark t3321-notes-stripspace.sh as leak-free Taylor Blau
2023-08-24 18:40 ` [PATCH 3/3] leak tests: mark t5583-push-branches.sh " Taylor Blau
2023-08-24 18:50 ` [PATCH 0/3] leak tests: mark remaining tests leak-free as such Junio C Hamano
2023-08-24 20:50 ` Jeff King
2023-08-24 20:54   ` Jeff King
2023-08-25 19:08   ` Taylor Blau
2023-08-25 20:35     ` Jeff King
2023-08-28 22:52 ` [PATCH v2 0/4] " Taylor Blau
2023-08-28 22:52   ` [PATCH v2 1/4] test-lib: ignore uninteresting LSan output Taylor Blau
2023-08-28 22:52   ` [PATCH v2 2/4] leak tests: mark a handful of tests as leak-free Taylor Blau
2023-08-28 22:53   ` [PATCH v2 3/4] leak tests: mark t3321-notes-stripspace.sh " Taylor Blau
2023-08-28 22:53   ` [PATCH v2 4/4] leak tests: mark t5583-push-branches.sh " Taylor Blau
2023-08-29  1:00   ` [PATCH v2 0/4] leak tests: mark remaining tests leak-free as such Jeff King
2023-08-29 16:43     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1711c4c817f95011bc477a9485c115b4926c7da.1692902414.git.me@ttaylorr.com \
    --to=me@ttaylorr.com \
    --cc=avarab@gmail.com \
    --cc=dyroneteng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).