Re: Having problems generating a code coverage report

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Having problems generating a code coverage report
Date: 2025-01-15 21:44:10
Message-ID: 1474060.1736977450@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> On Wed, Oct 30, 2024 at 5:26 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
>> I've also been unable to generate coverage reports for some time (at
>> least on Debian, with LCOV version 2.0-1).

> I found a temporary workaround. I'm now once again able to produce
> html coverage reports on my Debian unstable workstation.

I got around to poking at this on a shiny new Fedora 41 image,
with gcc-14.2.1 and lcov-2.0-4. I see errors and warnings aplenty
there too, but after reading the suppression hints that appear in
the error messages I was able to make them all go away:

$ make -s coverage-html GENHTML_FLAGS="-q --legend --ignore-errors unmapped,unmapped"
Overall coverage rate:
lines......: 60.7% (282865 of 466310 lines)
functions......: 67.4% (16114 of 23895 functions)
$

The "-q --legend" part is our default value of GENHTML_FLAGS,
the new magic is the --ignore-errors bit. As far as I can tell,
specifying "unmapped" once reduces that class of errors to
warnings and specifying it again silences them entirely.

With this, I got plausible-looking html output (I didn't vet it
in detail, but a couple of spot checks looked sane).

I'm curious whether a similar workaround will help with the
Debian toolchain.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2025-01-15 22:07:41 Re: convert libpgport's pqsignal() to a void function
Previous Message Jeff Davis 2025-01-15 21:21:34 Re: Unicode full case mapping: PG_UNICODE_FAST, and standard-compliant UCS_BASIC