| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie> |
| Subject: | Re: Having problems generating a code coverage report |
| Date: | 2026-04-30 22:45:39 |
| Message-ID: | 1035642.1777589139@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
=?utf-8?Q?=C3=81lvaro?= Herrera <alvherre(at)kurilemu(dot)de> writes:
> On 2026-Feb-18, Michael Paquier wrote:
>> Based on your ideas, I have been able to get my way through today with
>> this modified artistic flavor, for a non-VPATH build, in a Fedora
>> environment:
>> make coverage-html \
>> LCOVFLAGS="-q --ignore-errors gcov,gcov" \
>> GENHTML_FLAGS="-q --legend --ignore-errors unmapped,corrupt,unmapped,inconsistent"
> FWIW this has been failing all along (last report dates back Feb 17th),
> now because of this:
> lcov: ERROR: (negative) Unexpected negative hit count '-9' for line /home/coverage/pgsrc/pgsql/src/port/snprintf.c:529" while capturing from ./src/port/snprintf_shlib.gcda.
> (use "lcov --ignore-errors negative ..." to bypass this error)
> I added this flag as well, and the report is now running; we should have
> results soon.
Another data point: I got around to updating my dev machine to RHEL
10.1 (with lcov version 2.0-1), and unsurprisingly coverage-html
stopped working for me too. But here, it seems sufficient to use
LCOVFLAGS="-q --ignore-errors gcov,gcov"
GENHTML_FLAGS="-q --legend --ignore-errors unmapped,unmapped"
That still leaves me with a "no functions found" warning for each file
that compiles to empty with my build options. I saw those on my old
installation too, but for some reason it seems like there are more
now. I didn't find a way to suppress those, so that what my script
actually does now is
make -j16 -s coverage-html \
LCOVFLAGS="-q --ignore-errors gcov,gcov" \
GENHTML_FLAGS="-q --legend --ignore-errors unmapped,unmapped" \
2>&1 | grep -v -e 'gcno:no functions found$' -e '^stderr:$' \
-e 'WARNING: Duplicate specification "base-directory' \
-e 'WARNING: Duplicate specification "build-directory'
Silence is golden ;-)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-04-30 23:24:11 | Re: Fix race condition in XLogLogicalInfo and ProcSignal initialization. |
| Previous Message | Masahiko Sawada | 2026-04-30 22:08:54 | Re: Startup process deadlock: WaitForProcSignalBarriers vs aux process |