From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: git@jeffhostetler.com, gitster@pobox.com, peff@peff.net,
Jeff Hostetler <jeffhost@microsoft.com>,
git@vger.kernel.org
Subject: Re: [PATCH v5 3/4] test-strcmp-offset: created test for strcmp_offset
Date: Thu, 6 Apr 2017 10:21:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1704061014120.4268@virtualbox> (raw)
In-Reply-To: <20170405224752.2242-1-szeder.dev@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2040 bytes --]
Hi Gábor,
On Thu, 6 Apr 2017, SZEDER Gábor wrote:
> I think this patch should be squashed into the previous commit; I
> don't see any reason why the tests should be added in a different
> commit than the function they are testing.
I am of two minds there. In some cases, the newly added test demonstrates
the intended usage, and therefore makes for a nice documentation. In other
cases, the new test is large enough to stand on its own, i.e. to merit a
separate patch (also to make reviewing easier).
In this particular case, I tend to the latter: it is large enough a patch
that it is easier to review as a separate patch.
> > t/helper/test-strcmp-offset.c | 64 +++++++++++++++++++++++++++++++++++++++++++
> > t/t0065-strcmp-offset.sh | 11 ++++++++
> > 4 files changed, 77 insertions(+)
> > create mode 100644 t/helper/test-strcmp-offset.c
> > create mode 100755 t/t0065-strcmp-offset.sh
>
> Sure, tests are good, but I have to wonder how this would scale in the
> long term, when even such simple functions would get their own
> t/helper/test-func executable and t/tNNNN-func.sh script.
True. The proliferation of executables in t/helper/ got a little out of
hand.
But there is nothing preventing us from consolidating a few of them into a
single executable, using our wonderful option parsing function with
OPT_CMDMODE to switch between the different functions.
I could see, for example, how we could consolidate all string-related
test helpers into a single one, say, test-strings:
t/helper/test-ctype.c
t/helper/test-regex.c
t/helper/test-strcmp-offset.c
t/helper/test-string-list.c
t/helper/test-line-buffer.c
t/helper/test-urlmatch-normalization.c
t/helper/test-wildmatch.c
Also, these helpers seem to be related to index handling and could go into
a new test-index helper:
t/helper/test-dump-cache-tree.c
t/helper/test-dump-split-index.c
t/helper/test-dump-untracked-cache.c
t/helper/test-index-version.c
t/helper/test-scrap-cache-tree.c
Ciao,
Johannes
next prev parent reply other threads:[~2017-04-06 8:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 17:38 [PATCH v5 0/4] read-cache: speed up add_index_entry git
2017-04-05 17:38 ` [PATCH v5 1/4] p0004-read-tree: perf test to time read-tree git
2017-04-06 20:20 ` René Scharfe
2017-04-06 20:41 ` Jeff Hostetler
2017-04-05 17:38 ` [PATCH v5 2/4] read-cache: add strcmp_offset function git
2017-04-06 14:19 ` SZEDER Gábor
2017-04-06 15:58 ` Jeff Hostetler
2017-04-05 17:38 ` [PATCH v5 3/4] test-strcmp-offset: created test for strcmp_offset git
2017-04-05 22:47 ` SZEDER Gábor
2017-04-06 8:21 ` Johannes Schindelin [this message]
2017-04-06 14:25 ` Jeff Hostetler
2017-04-06 20:20 ` René Scharfe
2017-04-06 20:42 ` Jeff Hostetler
2017-04-05 17:38 ` [PATCH v5 4/4] read-cache: speed up add_index_entry during checkout git
2017-04-05 22:54 ` SZEDER Gábor
2017-04-06 14:05 ` Jeff Hostetler
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=alpine.DEB.2.20.1704061014120.4268@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=peff@peff.net \
--cc=szeder.dev@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).