From: Christian Couder <christian.couder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH 3/3] receive-pack: allow a maximum input size to be specified
Date: Thu, 18 Aug 2016 16:06:48 +0200 [thread overview]
Message-ID: <CAP8UFD0Wtekn-qR+RvRmj+rHFZS2DvFhqYdnygU0LwSabYLyoA@mail.gmail.com> (raw)
In-Reply-To: <20160816162141.b3jtmun3kynjnwxs@sigill.intra.peff.net>
On Tue, Aug 16, 2016 at 6:21 PM, Jeff King <peff@peff.net> wrote:
>> >
>> > Is there any reason to use different filenames and sizes for the two
>> > runs? They should behave identically, so it would make more sense to me
>> > to subject them to identical inputs.
>>
>> About the sizes, I thought that some people might want to try sizes
>> closer to the limit and also that it is good anyway in general to add
>> a bit of "randomness", or at least variability, in the tests.
>
> In general, I'd prefer a systematic approach to introducing variables
> into tests. If it's important that we test different sizes, then we
> should do so, and not only test some combinations (and if it is not
> important to test different sizes, then we should not waste CPU time and
> the mental energy of people reading the tests).
>
> IOW, when I see this, I wonder why the index-pack code path is not
> tested against a 2k file. But there really isn't a good reason. So
> either it does matter, and our tests do not have good coverage, or it
> does not, and it is just making me wonder if the tests are buggy.
I don't see things in the same way, but I will make the second file a
1k file too as I don't really care much about that.
> Worse, both files are created with the same seed via test-genrandom. So
> I suspect the 2k file is a superset of the 1k file, and we may send it
> is a thin delta (so it really is only testing a 1k input anyway!).
Yeah, I will use a different seed for the second file.
>> I thought that it would be a bit less wasteful to use the same "dest"
>> and also it would make the test more realistic as people often push in
>> non empty repos.
>
> I doubt it is expensive enough to matter in practice. Though note that
> if you push the same commit to two new repositories, then you can
> amortize the test-genrandom/add/commit step (i.e., push the exact same
> packfile in both cases).
Yeah, it probably doesn't matter anyway regarding efficiency, but I
still prefer to not create a new repo as I would find it more
confusing for the reader to use different repos.
Thanks,
Christian.
next prev parent reply other threads:[~2016-08-18 14:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 8:16 [PATCH 0/3] limit the size of the packs we receive Christian Couder
2016-08-16 8:16 ` [PATCH 1/3] index-pack: add --max-input-size=<size> option Christian Couder
2016-08-16 8:17 ` [PATCH 2/3] unpack-objects: " Christian Couder
2016-08-16 8:17 ` [PATCH 3/3] receive-pack: allow a maximum input size to be specified Christian Couder
2016-08-16 13:16 ` Jeff King
2016-08-16 14:27 ` Christian Couder
2016-08-16 16:21 ` Jeff King
2016-08-18 14:06 ` Christian Couder [this message]
2016-08-16 13:11 ` [PATCH 0/3] limit the size of the packs we receive Jeff King
2016-08-16 14:44 ` Christian Couder
2016-08-16 14:48 ` Jeff King
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=CAP8UFD0Wtekn-qR+RvRmj+rHFZS2DvFhqYdnygU0LwSabYLyoA@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.
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).