Thread (13 messages) 13 messages, 3 authors, 2023-09-23

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

From: Rubén Justo <hidden>
Date: 2023-09-23 08:11:52

On 23-sep-2023 02:24:15, Jeff King wrote:
On Fri, Sep 22, 2023 at 10:38:06PM +0200, Rubén Justo wrote:
quoted
[...]
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.
quoted
+	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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help