git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 20, 2020, 13:52 UTC
Message-ID
<nycvar.QRO.7.76.6.2002201448200.46@tvgsbejvaqbjf.bet>
In-Reply-To
<20200219204430.GB5101@syl.local>
Hi Taylor,
On Wed, 19 Feb 2020, Taylor Blau wrote:
Show 12 quoted lines
> 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.

Show 13 quoted lines
>
> > 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

Show 6 quoted lines
>
> Thanks,
> Taylor
>
> [1]: 846706e9-efe2-448d-67a3-a96638e9bcbc@gmail.com
>
Previous: Taylor Blau
Message 4 of 4 in “Git Test Coverage Report (Feb. 18, 2020)”
  1. Derrick StoleeFeb 18, 2020
  2. Derrick StoleeFeb 18, 2020
  3. Taylor BlauFeb 19, 2020
  4. Johannes SchindelinFeb 20, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.