git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Rubén Justo" <rjusto@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 4/4] test-lib: check for TEST_PASSES_SANITIZE_LEAK
Date: Mon, 29 Jan 2024 14:25:48 -0800	[thread overview]
Message-ID: <xmqq5xzbhj4j.fsf@gitster.g> (raw)
In-Reply-To: <6447b11b-f916-4079-8936-8d4f6c480f57@gmail.com> ("Rubén Justo"'s message of "Mon, 29 Jan 2024 22:08:38 +0100")

Rubén Justo <rjusto@gmail.com> writes:

> In a recent commit we fixed a test where it was set after sourcing
> test-lib.sh, leading to confusing results.

OK, the reference is to the previous step.  Makes sense.

>
> To prevent future oversights, let's add a simple check to ensure the
> value for TEST_PASSES_SANITIZE_LEAK remains unchanged at test_done().
>
> Signed-off-by: Rubén Justo <rjusto@gmail.com>
> ---
>  t/test-lib.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index fc93aa57e6..042f557a6f 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -1297,6 +1297,11 @@ test_done () {
>  		EOF
>  	fi
>  
> +	if test -z "$passes_sanitize_leak" && test_bool_env TEST_PASSES_SANITIZE_LEAK false
> +	then
> +		BAIL_OUT "Please, set TEST_PASSES_SANITIZE_LEAK before sourcing test-lib.sh"
> +	fi
> +
>  	if test "$test_fixed" != 0
>  	then
>  		say_color error "# $test_fixed known breakage(s) vanished; please update test(s)"

  reply	other threads:[~2024-01-29 22:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 21:04 [PATCH 0/4] mark tests as leak-free Rubén Justo
2024-01-29 21:08 ` [PATCH 1/4] t0080: mark " Rubén Justo
2024-01-29 22:15   ` Junio C Hamano
2024-01-29 23:20     ` Rubén Justo
2024-01-29 23:51       ` Junio C Hamano
2024-01-30 18:14         ` Rubén Justo
2024-01-30  5:53     ` Jeff King
2024-01-30 20:00       ` Junio C Hamano
2024-01-29 21:08 ` [PATCH 2/4] t5332: " Rubén Justo
2024-01-29 21:08 ` [PATCH 3/4] t6113: " Rubén Justo
2024-01-29 21:08 ` [PATCH 4/4] test-lib: check for TEST_PASSES_SANITIZE_LEAK Rubén Justo
2024-01-29 22:25   ` Junio C Hamano [this message]
2024-01-30  5:54 ` [PATCH 0/4] mark tests as leak-free Jeff King
2024-01-30 16:01   ` 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

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

  git send-email \
    --in-reply-to=xmqq5xzbhj4j.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rjusto@gmail.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.
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 NNTP newsgroup(s).