git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] test-lib: show leak-sanitizer logs on --immediate failure
Date: Thu, 26 Sep 2024 16:19:21 +0200	[thread overview]
Message-ID: <ZvVtafQfwnh6NLmQ@pks.im> (raw)
In-Reply-To: <20240924213636.GB1142403@coredump.intra.peff.net>

On Tue, Sep 24, 2024 at 05:36:36PM -0400, Jeff King wrote:
> 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

  reply	other threads:[~2024-09-26 14:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 21:34 [PATCH 0/3] LSan quality of life improvements Jeff King
2024-09-24 21:35 ` [PATCH 1/3] test-lib: stop showing old leak logs Jeff King
2024-09-26 14:19   ` Patrick Steinhardt
2024-09-24 21:36 ` [PATCH 2/3] test-lib: show leak-sanitizer logs on --immediate failure Jeff King
2024-09-26 14:19   ` Patrick Steinhardt [this message]
2024-09-24 21:38 ` [PATCH 3/3] test-lib: check for leak logs after every test Jeff King
2024-09-26 14:19   ` Patrick Steinhardt
2024-09-27  3:58     ` Jeff King
2024-09-26 14:19 ` [PATCH 0/3] LSan quality of life improvements Patrick Steinhardt

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=ZvVtafQfwnh6NLmQ@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).