Subject: Re: [PATCH 01/22] t/test-lib: allow skipping leak checks for passing tests

From: Toon claes <[email-masked]>
Date: Thu, 29 Aug 2024 16:15:58 +0200

Patrick Steinhardt <[email-masked]> writes:

> With `GIT_TEST_PASSING_SANITIZE_LEAK=check`, one can double check
> whether a memory leak fix caused some test suites to become leak free.
> It is somewhat slow to execute though because it runs all of our test
> suites with the leak sanitizer enabled. It is also pointless in most
> cases, because the only test suites that need to be checked are those
> which _aren't_ yet marked with `TEST_PASSES_SANITIZE_LEAK=true`.

What I understand from `t/README` the "check" value is used to test
whether the presence or absence of `TEST_PASSES_SANITIZE_LEAK=true`
matches the expectations. I think it's better to express that in the
first sentence, because it sounds a bit misleading at the moment if you
don't know that.

> Introduce a new value "check-failing". If set, we will only check those
> tests which are not yet marked as leak free.

I would also mention this still has the effect that tests which *are*
leak-free but do not have `TEST_PASSES_SANITIZE_LEAK=true` fail due to
the use of "--invert-exit-code".

Also, can you add a short paragraph about this value in "t/README"?

--
Toon