From: Derrick Stolee <stolee@gmail.com>
To: Git List <git@vger.kernel.org>
Cc: Garima Singh <garimasigit@gmail.com>, Jeff King <peff@peff.net>
Subject: Re: Git Test Coverage Report (Feb. 18, 2020)
Date: Tue, 18 Feb 2020 07:55:23 -0500 [thread overview]
Message-ID: <d3635fdf-1948-5d58-a1bf-abd5f56b18d1@gmail.com> (raw)
In-Reply-To: <2c97befe-9be8-9946-b643-91656fa3dcd8@gmail.com>
Here are some notes that apply to the changed-path Bloom filter series [1].
[1] https://lore.kernel.org/git/pull.497.v2.git.1580943390.gitgitgadget@gmail.com/
On 2/18/2020 7:46 AM, Derrick Stolee wrote:
> Derrick Stolee 92667ee9 commit-graph: examine commits by generation number
> commit-graph.c
> 92667ee9 89) else if (a->date > b->date)
> 92667ee9 90) return 1;
> 92667ee9 91) return 0;
> 92667ee9 1296) QSORT(sorted_by_pos, ctx->commits.nr, commit_pos_cmp);
This QSORT not being covered means we are not testing the --changed-paths
option with an input option that scans pack-files, and instead always using
--reachable.
Garima: could we update Peff's commit that originally introduced this QSORT
to have such a test? Thanks!
> Garima Singh 282c08a9 commit-graph: write Bloom filters to commit graph file
> commit-graph.c
> 282c08a9 328) chunk_repeated = 1;
> 282c08a9 335) chunk_repeated = 1;
> 282c08a9 342) break;
> 282c08a9 371) graph->chunk_bloom_indexes = NULL;
> 282c08a9 372) graph->chunk_bloom_data = NULL;
> 282c08a9 373) graph->bloom_filter_settings = NULL;
I wouldn't worry about testing these error conditions.
> 282c08a9 1087) progress = start_delayed_progress(
> 282c08a9 1089) ctx->commits.nr);
> 282c08a9 1112) progress = start_delayed_progress(
> 282c08a9 1114) ctx->commits.nr);
> 282c08a9 1288) progress = start_delayed_progress(
But, could we have a test that verifies the progress is output for these
steps? Use GIT_PROGRESS_DELAY=0 to guarantee that the strings are output.
> Garima Singh b6d925e7 bloom: core Bloom filter implementation for changed paths
> bloom.c
> b6d925e7 247) for (i = 0; i < diff_queued_diff.nr; i++)
> b6d925e7 248) diff_free_filepair(diff_queued_diff.queue[i]);
> b6d925e7 249) filter->data = NULL;
> b6d925e7 250) filter->len = 0;
These are a result of the case of a commit having over 512 changes. I think
there is a follow-up item to make this 512 value be configurable, and when
we do that, then we should add a test that covers this case, but with a
smaller configured value.
> t/helper/test-bloom.c
> b6d925e7 20) printf("No filter.\n");
> b6d925e7 21) return;
This could be covered similarly with such a test.
> Jeff King dc9f0216 commit-graph: examine changed-path objects in pack order
> commit-graph.c
> dc9f0216 62) return; /* should never happen, but be lenient */
> dc9f0216 67) static int commit_pos_cmp(const void *va, const void *vb)
> dc9f0216 69) const struct commit *a = *(const struct commit **)va;
> dc9f0216 70) const struct commit *b = *(const struct commit **)vb;
> dc9f0216 71) return commit_pos_at(&commit_pos, a) -
> dc9f0216 72) commit_pos_at(&commit_pos, b);
As mentioned earlier, we just don't cover --changed-paths along with
scanning pack-files, but we should.
Thanks,
-Stolee
next prev parent reply other threads:[~2020-02-18 12:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 12:46 Git Test Coverage Report (Feb. 18, 2020) Derrick Stolee
2020-02-18 12:55 ` Derrick Stolee [this message]
2020-02-19 20:44 ` Taylor Blau
2020-02-20 13:52 ` Johannes Schindelin
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=d3635fdf-1948-5d58-a1bf-abd5f56b18d1@gmail.com \
--to=stolee@gmail.com \
--cc=garimasigit@gmail.com \
--cc=git@vger.kernel.org \
--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).