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

Re: [PATCH 2/3] test-lib: show leak-sanitizer logs on --immediate failure

From
Patrick Steinhardt <ps@pks.im>
Date
Sep 26, 2024, 14:19 UTC
Message-ID
<ZvVtafQfwnh6NLmQ@pks.im>
In-Reply-To
<20240924213636.GB1142403@coredump.intra.peff.net>
On Tue, Sep 24, 2024 at 05:36:36PM -0400, Jeff King wrote:
Show 22 quoted lines
> When we've compiled with SANITIZE=leak, at the end of the test script
> we'll dump any collected logs to stdout. These logs have two uses:
> 
>   1. Leaks don't always cause a test snippet to fail (e.g., if they
>      happen in a sub-process that we expect to return non-zero).
>      Checking the logs catches these cases that we'd otherwise miss
>      entirely.
> 
>   2. LSan will dump the leak info to stderr, but that is sometimes
>      hidden (e.g., because it's redirected by the test, or because it's
>      in a sub-process whose stderr goes elsewhere). Dumping the logs is
>      the easiest way for the developer to see them.
> 
> One downside is that the set of logs for an entire script may be very
> long, especially when you're trying to fix existing test scripts. You
> can run with --immediate to stop at the first failing test, which means
> we'll have accrued fewer logs. But we don't show the logs in that case!
> 
> Let's start doing so. This can only help case (2), of course (since it
> depends on test failure). And it's somewhat weakened by the fact that
> any cases of (1) will pollute the logs. But we can improve things
> further in the next patch.
Yes, please!
Patrick
Previous: Jeff KingNext: Jeff King
Message 5 of 9 in “LSan quality of life improvements”
  1. 0/3 LSan quality of life improvementsJeff King, Sep 24, 2024
  2. 1/3 test-lib: stop showing old leak logsJeff King, Sep 24, 2024
  3. Patrick SteinhardtSep 26, 2024
  4. 2/3 test-lib: show leak-sanitizer logs on --immediate failureJeff King, Sep 24, 2024
  5. Patrick SteinhardtSep 26, 2024
  6. 3/3 test-lib: check for leak logs after every testJeff King, Sep 24, 2024
  7. Patrick SteinhardtSep 26, 2024
  8. Jeff KingSep 27, 2024
  9. Patrick SteinhardtSep 26, 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.