git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Derrick Stolee <stolee@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git Test Coverage Report (Saturday, Oct 27)
Date: Sat, 27 Oct 2018 19:10:03 +0000	[thread overview]
Message-ID: <20181027191003.GG6119@genre.crustytoothpaste.net> (raw)
In-Reply-To: <5db6213b-b7d0-b995-de80-9671604416a5@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]

On Sat, Oct 27, 2018 at 09:27:21AM -0400, Derrick Stolee wrote:
> In an effort to ensure new code is reasonably covered by the test suite, we
> now have contrib/coverage-diff.sh to combine the gcov output from 'make
> coverage-test ; make coverage-report' with the output from 'git diff A B' to
> discover _new_lines of code that are not covered. This report ignores lines
> including "BUG(".

Thanks for producing this.

> Commits introducing uncovered code:
> brian m. carlson      2f90b9d9b: sha1-file: provide functions to look up
> hash algorithms
> brian m. carlson      b3a41547c: hex: introduce functions to print arbitrary
> hashes

These two are expected.  One this series makes its way to master, I'll
send patches that use it in a bunch more places, and these functions
will be adequately covered by multiple code paths.

> Uncovered in next not in master
> -------------------------------
> 
> apply.c
> eccb5a5f3d 4071) return get_oid_hex(p->old_oid_prefix, oid);

This one is just a name change.  However, I think it's interesting that
this code path isn't covered in the normal case (and presumably isn't
covered before my patch).  From the comment, this appears to be limited
to the case where the index line in the patch contains the full object
ID.

I'll try to see if I can come up with a test to cover this case.

> builtin/repack.c
> 2f0c9e9a9b 239) die("repack: Expecting full hex object ID lines only from
> pack-objects.");
> 2f0c9e9a9b 411) die("repack: Expecting full hex object ID lines only from
> pack-objects.");

These are a change solely in text from what was there before.
Considering that git pack-objects would have to be modified to produce
invalid data in order to trigger these (as discussed in the series that
changed them), I think it's okay that these are uncovered.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]

      parent reply	other threads:[~2018-10-27 19:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 13:27 Git Test Coverage Report (Saturday, Oct 27) Derrick Stolee
2018-10-27 13:55 ` Junio C Hamano
2018-10-27 19:47   ` Derrick Stolee
2018-10-27 19:10 ` brian m. carlson [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=20181027191003.GG6119@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=stolee@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).