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

Re: [PATCH v2] test-lib: fix GIT_TEST_SANITIZE_LEAK_LOG

From
Rubén Justo <rjusto@gmail.com>
Date
Sep 23, 2023, 08:11 UTC
Message-ID
<f33cbdf5-9887-e9c4-504e-f7d96e630bc4@gmail.com>
In-Reply-To
<20230923062415.GA1469941@coredump.intra.peff.net>
On 23-sep-2023 02:24:15, Jeff King wrote:
Show 17 quoted lines
> On Fri, Sep 22, 2023 at 10:38:06PM +0200, Rubén Justo wrote:
> 
> > [...]
> > Let's add the missing conditions in the if-elses chain to make it work
> > as expected.
> 
> Thanks, I think this explains the situation better than the original.
> 
> > +	elif test "$test_failure" = 0
> > +	then
> >  		say "With GIT_TEST_SANITIZE_LEAK_LOG=true our logs revealed a memory leak, exit non-zero!" &&
> >  		invert_exit_code=t
> > +	else
> > +		say "With GIT_TEST_SANITIZE_LEAK_LOG=true our logs revealed a memory leak..."
> >  	fi
> 
> OK, so you did add in the "else" here. :)
Yes, easier to explain XD

I had last minute doubts about the missing "invert_exit_code=", but decided not to include it. This way, "--invert-exit-code" works as expected with "failing" tests.

Maybe we can make "--invert-exit-code" work in the other cases as well.
But let's let the dust settle, before scratching that itch :)
> I am obviously fine with that,
> and the patch overall looks good to me.
Thank you for keeping an eye on this.
> 
> -Peff
Previous: Jeff King
Message 16 of 16 in “fix GIT_TEST_SANITIZE_LEAK_LOG=true”
  1. 0/2 fix GIT_TEST_SANITIZE_LEAK_LOG=trueRubén Justo, Sep 9, 2023
  2. 1/2 test-lib: prevent misuses of --invert-exit-codeRubén Justo, Sep 9, 2023
  3. Eric SunshineSep 10, 2023
  4. Rubén JustoSep 10, 2023
  5. Jeff KingSep 12, 2023
  6. Rubén JustoSep 15, 2023
  7. 2/2 test-lib: fix GIT_TEST_SANITIZE_LEAK_LOGRubén Justo, Sep 9, 2023
  8. Jeff KingSep 12, 2023
  9. Rubén JustoSep 15, 2023
  10. Jeff KingSep 15, 2023
  11. Junio C HamanoSep 15, 2023
  12. Jeff KingSep 16, 2023
  13. Junio C HamanoSep 15, 2023
  14. test-lib: fix GIT_TEST_SANITIZE_LEAK_LOGRubén Justo, Sep 22, 2023
  15. Jeff KingSep 23, 2023
  16. Rubén JustoSep 23, 2023

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.