Re: Git Test Coverage Report (Feb. 18, 2020)

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

 



Hi Taylor,

On Wed, 19 Feb 2020, Taylor Blau wrote:

> On Tue, Feb 18, 2020 at 07:46:03AM -0500, Derrick Stolee wrote:
>
> > Taylor Blau	5d5916fd builtin/commit-graph.c: support '--split[=<strategy>]'
> > commit-graph.c
> > 5d5916fd 1751) break;
>
> This 'break' line only changed indentation, so I don't think that this
> is new 'uncovered' code in my series, only that it got a little bit
> harder to trigger.
>
> It is interesting that this is uncovered, but I don't think that there's
> a huge sense of urgency to add tests to cover it.

I could imagine that this is actually not the `break` statement, but the
one before that. It seems to be an issue with the way GCC optimizes that
sometimes GDB (and gcov) have problems attributing precisely the line that
is associated with a given assembler instruction. My guess is that the
optimizer often seems to "reflow" the code, e.g. it would jump to the end
of a switch statement only to jump _back_ to the actual switch case.

So I would expect the report to be legit, but pointing to the incorrect
source code line. At least that's what I seem to recall from the last time
a Test Code Coverage report pointed at one of the `break` statements I had
added.

>
> > Taylor Blau	a599e2c9 builtin/commit-graph.c: introduce '--input=<source>'
> > builtin/commit-graph.c
> > a599e2c9 75) *to = 0;
> > a599e2c9 76) return 0;
>
> These seem more interesting to cover, but only marginally so.
>
> > a599e2c9 86) *to |= COMMIT_GRAPH_INPUT_APPEND;
>
> This one I think we could ignore, though, since the same behavior is
> triggered by simply '--append' instead of '--input=append'. We decided
> in [1] to

to...? :-D

Thanks,
Dscho

>
> Thanks,
> Taylor
>
> [1]: 846706e9-efe2-448d-67a3-a96638e9bcbc@xxxxxxxxx
>




[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