Re: [PATCH v2 1/2] ci: annotate leaks and stop a leak-sanitizer script at its first failure
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Sep 29, 2026, 07:47 UTC
- Message-ID
- <CAHwyqnXX-kxDmsE+uiVHZ3=6iKvNkWkd5VkK1tRmFBS7fGWmxQ@mail.gmail.com>
- In-Reply-To
- <xmqqtsn9kssi.fsf@gitster.g>
Show 10 quoted lines
> > Once a script has one leak, it keeps running: the sanitizer log > > directory is never cleared between tests, so every later test in the > > same script sees the same leftover log entries and also reports "not > > ok", burying the one real failure in copies of itself. Stop a > > leak-sanitizer script at its first failure with --immediate instead. > > OK. So the idea is that we do not have sanitizer report per > test_expect_* block but showing the single one over and over, > whether the next test_expect_* block has leaks, is not helpful, so > we just immediately kill the test script after the first leak?
Yes that's it, one leak makes continuing pointless since every later test would just see the same accumulated log, so we stop there instead.
Show 18 quoted lines
> > if test -n "$immediate" > > then > > say_color error "1..$test_count" > > - if test -n "$invert_exit_code" > > - then > > - finalize_test_output > > - _invert_exit_code_failure_end_blurb > > - GIT_EXIT_OK=t > > - exit 0 > > - fi > > check_test_results_san_file_ "$test_failure" > > _error_exit > > fi > > The two-line comment in the middle made me puzzled to see "exit 0" > just above it. If "--immediate" is asked and we are checking leaks, > shouldn't we be doing finalize_test_case_output regardless of the > "invert" setting?
I'll take a look at that, it might be a problem.
Harald