git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Matt Cooper via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com, me@ttaylorr.com,
	derrickstolee@github.com, Matt Cooper <vtbassmatt@gmail.com>
Subject: Re: [PATCH v2] index-pack: clarify the breached limit
Date: Thu, 24 Feb 2022 01:14:25 +0100	[thread overview]
Message-ID: <220224.86wnhl9ky8.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <pull.1158.v2.git.1645661240356.gitgitgadget@gmail.com>


On Thu, Feb 24 2022, Matt Cooper via GitGitGadget wrote:

> From: Matt Cooper <vtbassmatt@gmail.com>
> [...]
> +test_expect_success 'too-large packs report the breach' '
> +	pack=$(git pack-objects --all pack </dev/null) &&
> +	sz="$(test_file_size pack-$pack.pack)" &&

I don't think this needs a re-roll, but FWIW I have an old-ish local
patch I haven't submitted yet to s/test_file_size/test-tool path-utils
file-size/g in the test suite.

I.e. we've been moving more in the direction of using test-tool
directly, which some tests already do in that case, with some using
test_file_size.

> +	test "$sz" -gt 20 &&
> +	test_must_fail git index-pack --max-input-size=20 pack-$pack.pack 2>err &&
> +	grep "maximum allowed size (20 bytes)" err
> +'

Maybe this is covered by another test, but in case we don't have a test
for this error already: This doesn't cover that we don't error on packs
smaller than the limit, so in terms of black-box testing it's
indistinguishable from us erroring out about this all the time.

But that's probably too paranoid in the first place, and maybe we do
have that other test...

      reply	other threads:[~2022-02-24  0:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 16:03 [PATCH 0/2] Specify the actual pack size limit which is breached Matt Cooper via GitGitGadget
2022-02-23 16:03 ` [PATCH 1/2] index-pack: clarify the breached limit Matt Cooper via GitGitGadget
2022-02-23 16:03 ` [PATCH 2/2] t5302: confirm that large packs mention limit Matt Cooper via GitGitGadget
2022-02-23 17:22   ` Taylor Blau
2022-02-23 23:26     ` Junio C Hamano
2022-02-23 23:41       ` Taylor Blau
2022-02-23 16:33 ` [PATCH 0/2] Specify the actual pack size limit which is breached Taylor Blau
2022-02-24  0:07 ` [PATCH v2] index-pack: clarify the breached limit Matt Cooper via GitGitGadget
2022-02-24  0:14   ` Ævar Arnfjörð Bjarmason [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220224.86wnhl9ky8.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=me@ttaylorr.com \
    --cc=vtbassmatt@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).