public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jacob Champion <[email protected]>
To: Andres Freund <[email protected]>
Cc: Michael Paquier <[email protected]>
Cc: Aleksander Alekseev <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: jian he <[email protected]>
Cc: Peter Geoghegan <[email protected]>
Subject: Re: Having problems generating a code coverage report
Date: Wed, 10 Jun 2026 17:49:47 -0700
Message-ID: <CAOYmi+=Q5vc9opdg6PGM8RVgchu7SaDNPoN9D3XUF++Bmbyy_w@mail.gmail.com> (raw)
In-Reply-To: <bxrbuxmpin6a3gunynde7c67ircaud5sxmjgid5kpidyzic55a@tqsmafqk6wah>
References: <CAJ7c6TN+MCh99EZ8YGhXZAdnqvNQYir6E34B_mmcB5KsxCB00A@mail.gmail.com>
	<CAH2-WzkTDv1PGhyssyHaV1smSEUNktDV3ACfwZsL-iE2=9hOVA@mail.gmail.com>
	<[email protected]>
	<CAJ7c6TPYPF93+yWi=ThKiOsnhqLpeTmctMrJWz3xRQobGSY6BA@mail.gmail.com>
	<CACJufxG+vX_pfPNJTo1WXP_QzGO1KXrVa0yYMkpBqL8nJvQ-VA@mail.gmail.com>
	<CAJ7c6TMhH2DK6uAGekrn5Xbd5PcPMkTfN4Ot2EfBkuRB3QVy7g@mail.gmail.com>
	<CAJ7c6TNg-4Lc4rXkM3SA95LCUef5QPvfiTAOAe58=8g6oenzuw@mail.gmail.com>
	<CAJ7c6TOkAMyHuNPWnF5S9ciOtB52reNgcv50XtyQNb2gY_DYyA@mail.gmail.com>
	<nqql77bmqixd232hrb6paw47evj6ramp6omsatwoofuzflcwak@j6t2wru3iqfd>
	<[email protected]>
	<bxrbuxmpin6a3gunynde7c67ircaud5sxmjgid5kpidyzic55a@tqsmafqk6wah>

On Wed, Jan 21, 2026 at 5:59 PM Andres Freund <[email protected]> wrote:
> I have the following .lcovrc in my postgres source dir:
>
> ignore_errors=inconsistent,gcov,range
> check_data_consistency=0
> stop_on_error=0
> genhtml_hierarchical=1
> genhtml_show_navigation=1
> parallel=16
> geninfo_gcov_tool=/usr/bin/gcov-15
>
> (assuming you build with gcc 15)
>
> With that meson coverage information works (i.e. ninja coverage-html) for both
> lcov 2.0 and 2.4 as long as the build directory is outside of the source
> directory. Both on Debian Sid and macos.

Setting `genhtml_no_prefix = 1` fixes the directory name collision for
me (clang 22, lcov 2.4) without rehoming the build directory. (As does
hacking meson to pass the source root --prefix before the build root,
which makes for prettier output. Apparently lcov doesn't handle the
case where one prefix is a substring of the other very well.)

Also, in case it helps anyone: I found that clang-15 generates
outright buggy .gcno information for some of our #included C snippets,
such as `#include "equalfuncs.switch.c"`, and lcov-2's stricter
processing correctly complains about it. Apparently that was fixed at
some point with newer clangs.

--Jacob






view thread (12+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Having problems generating a code coverage report
  In-Reply-To: <CAOYmi+=Q5vc9opdg6PGM8RVgchu7SaDNPoN9D3XUF++Bmbyy_w@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox