Re: Git Test Coverage Report (Saturday, Oct 27)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux