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

Re: Git Test Coverage Report (Nov 25)

From
Derrick Stolee <stolee@gmail.com>
Date
Nov 28, 2019, 22:04 UTC
Message-ID
<b9515bf6-81ec-3b24-8982-5248e36306fe@gmail.com>
In-Reply-To
<nycvar.QRO.7.76.6.1911272029050.31080@tvgsbejvaqbjf.bet>
On 11/27/2019 2:32 PM, Johannes Schindelin wrote:
Show 35 quoted lines
> Hi Stolee,
> 
> On Wed, 27 Nov 2019, Derrick Stolee wrote:
> 
>> On 11/26/2019 3:46 PM, Johannes Schindelin wrote:
>>
>>> [...] the Windows build.
>>
>> Sorry that I have not set up a Windows build, but the Linux test-coverage
>> build already takes a long time so adding Windows would be complicated.
>> (Not to mention that merging the uncovered lines across two platforms would
>> be a huge challenge.)
>>
>> If anyone wants to consider such an effort, I'm willing to play along.
> 
> I fear it is even worse: once upon a time, I tried to set up a gcov run
> with mingw-w64-gcc, and it failed miserably (there was simply no output at
> all).
> 
> So I, for one, am completely comfortable with keeping the status quo for
> the time being.
> 
>>>> Johannes Schindelin	116d1fa6 vreportf(): avoid relying on stdio buffering
>>>> usage.c
>>>> 116d1fa6 16) fprintf(stderr, "BUG!!! too long a prefix '%s'\n", prefix);
>>>> 116d1fa6 17) abort();
>>>> 116d1fa6 22) *p = '\0'; /* vsnprintf() failed, clip at prefix */
>>>
>>> Those are defensive programming, so this is expected not to be covered.
>>
>> I wonder why we are not using BUG() here (for the fprintf and abort).
> 
> It's because `BUG()` calls `vreportf()`, and even if the _current_ version
> would bail out at some point, I would be uncomfortable calling `BUG()`
> from `vreportf()` and risk a (future-only) recursion ad infinitum.
That's a pretty good reason to not use BUG() here!
Previous: Johannes SchindelinNext: Phillip Wood
Message 5 of 6 in “Git Test Coverage Report (Nov 25)”
  1. Derrick StoleeNov 25, 2019
  2. Johannes SchindelinNov 26, 2019
  3. Derrick StoleeNov 27, 2019
  4. Johannes SchindelinNov 27, 2019
  5. Derrick StoleeNov 28, 2019
  6. Phillip WoodNov 28, 2019

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.