pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pierre Forstmann <pierre.forstmann@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: How to run test coverage on Debian 13 ?
Date: Sat, 03 Oct 2026 12:21:45 -0400
Message-ID: <75993.1791044505@sss.pgh.pa.us> (raw)
In-Reply-To: <27e7ac16-5f9c-454b-ad64-ed0411d41a71@gmail.com>
References: <27e7ac16-5f9c-454b-ad64-ed0411d41a71@gmail.com>

Pierre Forstmann <pierre.forstmann@gmail.com> writes:
> I'm trying to test run test coverage using master branch on Debian 13 with:
> ...
> postgres@alma:~/postgresql$ make coverage-html
> /usr/bin/lcov --gcov-tool /usr/bin/gcov -q --no-external -c -i -d . -d . 
> -o lcov_base.info
> lcov: ERROR: (usage) duplicate file ./src/backend/parser/scan.gcno in 
> both . and .
>      (use "lcov --ignore-errors usage ..." to bypass this error)
> Message summary:
>    1 error message:
>      usage: 1
> make: *** [src/Makefile.global:1065: lcov_base.info] Error 1

Yeah, recent versions of lcov are rather broken :-(.
Best bet is to apply "--ignore-errors" liberally,
and even then you'll get a bunch of useless warnings.
The output seems correct despite all that.

My coverage-running script currently does this so that
I don't see any complaints:

-----
# In RHEL 10.1 (LCOV version 2.0-1), we need a bunch of options
# to silence useless-and-probably-bogus warnings.
make -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'
-----

You might want to leave out the "grep -v" part until you've
satisfied yourself that no interesting messages are produced
on your installation.

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <75993.1791044505@sss.pgh.pa.us>
Permalink:  ../75993.1791044505@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/75993.1791044505@sss.pgh.pa.us

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pierre.forstmann@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: How to run test coverage on Debian 13 ?
  In-Reply-To: <75993.1791044505@sss.pgh.pa.us>

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

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