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

Re: [PATCH 1/4] t0080: mark as leak-free

From
Rubén Justo <rjusto@gmail.com>
Date
Jan 29, 2024, 23:20 UTC
Message-ID
<c932fbfc-f14f-4403-bfc5-cf1d616b22de@gmail.com>
In-Reply-To
<xmqqa5onhjm4.fsf@gitster.g>
On 29-ene-2024 14:15:15, Junio C Hamano wrote:
Show 20 quoted lines
> Rubén Justo <rjusto@gmail.com> writes:
> 
> > This test is leak-free since it was added in e137fe3b29 (unit tests: add
> > TAP unit test framework, 2023-11-09)
> >
> > Let's mark it as leak-free to make sure it stays that way (and to reduce
> > noise when looking for other leak-free scripts after we fix some leaks).
> 
> For other tests in this series, that rationale is a very sensible
> thing, but does it apply to this one?
> 
> The point of the t-basic tests is to ensure the lightweight unit
> test framework that requires nothing from Git behaves (and keeps
> behaving) sensibly.  The point of running t[0-9][0-9][0-9][0-9]
> tests under leak sanitizer is to exercise production Git code to
> catch leaks in Git code.
> 
> So it is not quite clear if we even want to run this t0080 under
> leak sanitizer to begin with.  t0080 is a relatively tiny test, but
> do we even want to spend leak sanitizer cycles on it?  I dunno.

IIUC, that would imply building test-tool with a different set of flags than Git, new artifacts ... or running test-tool with some LSAN_OPTIONS options, to disable it ... or both ... or ...

And that is assuming that with test-tool we won't catch a leak in Git that we're not seeing in the other tests ...

Maybe this is tangential to this series but, while a decision is being made, annotating the test makes GIT_TEST_PASSING_SANITIZE_LEAK=check pass, which is the objective in this series.

Show 18 quoted lines
> 
> > Signed-off-by: Rubén Justo <rjusto@gmail.com>
> > ---
> >  t/t0080-unit-test-output.sh | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/t/t0080-unit-test-output.sh b/t/t0080-unit-test-output.sh
> > index 961b54b06c..6657c114a3 100755
> > --- a/t/t0080-unit-test-output.sh
> > +++ b/t/t0080-unit-test-output.sh
> > @@ -2,6 +2,7 @@
> >  
> >  test_description='Test the output of the unit test framework'
> >  
> > +TEST_PASSES_SANITIZE_LEAK=true
> >  . ./test-lib.sh
> >  
> >  test_expect_success 'TAP output from unit tests' '
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 14 in “mark tests as leak-free”
  1. 0/4 mark tests as leak-freeRubén Justo, Jan 29, 2024
  2. 1/4 t0080: mark as leak-freeRubén Justo, Jan 29, 2024
  3. Junio C HamanoJan 29, 2024
  4. Rubén JustoJan 29, 2024
  5. Junio C HamanoJan 29, 2024
  6. Rubén JustoJan 30, 2024
  7. Jeff KingJan 30, 2024
  8. Junio C HamanoJan 30, 2024
  9. 2/4 t5332: mark as leak-freeRubén Justo, Jan 29, 2024
  10. 3/4 t6113: mark as leak-freeRubén Justo, Jan 29, 2024
  11. 4/4 test-lib: check for TEST_PASSES_SANITIZE_LEAKRubén Justo, Jan 29, 2024
  12. Junio C HamanoJan 29, 2024
  13. Jeff KingJan 30, 2024
  14. Junio C HamanoJan 30, 2024

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.