diff mbox series

t0613: mark as leak-free

Message ID 23d41343-54fd-46c6-9d78-369e8009fa0b@gmail.com (mailing list archive)
State New
Headers show
Series t0613: mark as leak-free | expand

Commit Message

Rubén Justo June 30, 2024, 6:46 a.m. UTC
We can mark t0613 as leak-free:

    $ make test SANITIZE=leak GIT_TEST_PASSING_SANITIZE_LEAK=check GIT_TEST_SANITIZE_LEAK_LOG=true T=t0613-reftable-write-options.sh
    [...]
    *** t0613-reftable-write-options.sh ***
    in GIT_TEST_PASSING_SANITIZE_LEAK=check mode, setting --invert-exit-code for TEST_PASSES_SANITIZE_LEAK != true
    ok 1 - default write options
    ok 2 - disabled reflog writes no log blocks
    ok 3 - many refs results in multiple blocks
    ok 4 - tiny block size leads to error
    ok 5 - small block size leads to multiple ref blocks
    ok 6 - small block size fails with large reflog message
    ok 7 - block size exceeding maximum supported size
    ok 8 - restart interval at every single record
    ok 9 - restart interval exceeding maximum supported interval
    ok 10 - object index gets written by default with ref index
    ok 11 - object index can be disabled
    # passed all 11 test(s)
    1..11
    # faking up non-zero exit with --invert-exit-code
    make[2]: *** [Makefile:75: t0613-reftable-write-options.sh] Error 1

Do it.

Signed-off-by: Rubén Justo <rjusto@gmail.com>
---

I'm not sure why this simple change has fallen through the cracks.
Therefore, it's possible that I'm missing something.

I'd appreciate if someone could double-check.

Thanks.

 t/t0613-reftable-write-options.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff King July 1, 2024, 3:57 a.m. UTC | #1
On Sun, Jun 30, 2024 at 08:46:38AM +0200, Rubén Justo wrote:

> We can mark t0613 as leak-free:
> [...]
> I'm not sure why this simple change has fallen through the cracks.
> Therefore, it's possible that I'm missing something.
> 
> I'd appreciate if someone could double-check.

I'd noticed it, too, while doing recent leak fixes. But since Patrick
has been working on leaks and is the go-to person for reftables, I
assumed he had already seen it and there was something clever going on. ;)

I also get a passing result from t0612 (and I do have JGit available, so
it actually runs the tests).

I also get funny results from t4255, but I think we can ignore them.
It's known breakages vanishing, which I guess is just some sub-program
returning failure due to a leak and changing the test results.

So anyway, this patch looks good to me, but probably we could squash
t0612 into it, as well.

-Peff
Rubén Justo July 1, 2024, 7:35 p.m. UTC | #2
On Sun, Jun 30, 2024 at 11:57:59PM -0400, Jeff King wrote:
> On Sun, Jun 30, 2024 at 08:46:38AM +0200, Rubén Justo wrote:
> 
> > We can mark t0613 as leak-free:
> > [...]
> > I'm not sure why this simple change has fallen through the cracks.
> > Therefore, it's possible that I'm missing something.
> > 
> > I'd appreciate if someone could double-check.
> 
> I'd noticed it, too, while doing recent leak fixes. But since Patrick
> has been working on leaks and is the go-to person for reftables, I
> assumed he had already seen it and there was something clever going on. ;)
> 
> I also get a passing result from t0612 (and I do have JGit available, so
> it actually runs the tests).

I have no idea how JGit works, and I didn't have it installed either. 
But after a quick test, I can confirm that t0612 can also be marked as
leak-free.

I'll respond to this message shortly with a patch to fix that.

> 
> I also get funny results from t4255, but I think we can ignore them.
> It's known breakages vanishing, which I guess is just some sub-program
> returning failure due to a leak and changing the test results.
> 
> So anyway, this patch looks good to me, but probably we could squash
> t0612 into it, as well.
> 
> -Peff

Thank you!
diff mbox series

Patch

diff --git a/t/t0613-reftable-write-options.sh b/t/t0613-reftable-write-options.sh
index e2708e11d5..b1c6c97524 100755
--- a/t/t0613-reftable-write-options.sh
+++ b/t/t0613-reftable-write-options.sh
@@ -16,6 +16,7 @@  export GIT_TEST_DEFAULT_HASH
 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 
+TEST_PASSES_SANITIZE_LEAK=true
 . ./test-lib.sh
 
 test_expect_success 'default write options' '