Coverage (lcov) failing with inconsistent error in versions 2.x

From: "Jonathan Gonzalez V(dot)" <jonathan(dot)abdiel(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Coverage (lcov) failing with inconsistent error in versions 2.x
Date: 2026-07-01 12:12:35
Message-ID: 87ldbuc3ik.fsf@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

While working on another patch I was suggested to check the coverage of
the tests, but I hit some errors while trying to build the coverage.

The first error and that it's fixed here are:

lcov: ERROR: (inconsistent) "/home/zeus/src/postgresql/src/interfaces/libpq/fe-auth-oauth.c":869: duplicate function 'use_builtin_flow' starts on line "/home/zeus/src/postgresql/src/interfaces/libpq/fe-auth-oauth.c":869 but previous definition started on 991 while capturing from /home/zeus/src/postgresql/build/src/interfaces/libpq/libpq.so.5.19.p/fe-auth-oauth.c.gcno.
(use "lcov --ignore-errors inconsistent ..." to bypass this error)

lcov: ERROR: (inconsistent) "/home/zeus/src/postgresql/worktrees/lcov/src/include/lib/simplehash.h":450: duplicate function 'blockreftable_create' starts on line "/home/zeus/src/postgresql/worktrees/lcov/src/include/lib/simplehash.h":450 but previous definition started on 447 while capturing from /home/zeus/src/postgresql/worktrees/lcov/build/src/common/libpgcommon_srv.a.p/blkreftable.c.gcno.
(use "lcov --ignore-errors inconsistent ..." to bypass this error)

These error are due to duplicated declaration of SH_CREATE() and
use_builtin_flow(), and will only appear in version of lcov >= 2.0
which is the version, but with version 1.16 this doesn't happens.

These failure has already been discussed here[0], but this is a
patch on the code rather than add an exception. That thread still having
some valid points related to another failure that should be discussed
there.

[0] https://www.postgresql.org/message-id/flat/CAHsn6_xCDQWe8_vVFhtFk27_xTdyVV%2BDr0yWzaooBZ6%2B-VH-5w%40mail.gmail.com

--
Jonathan Gonzalez V.
EDB
https://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-libpq-oauth-collapse-use_builtin_flow-into-a-sing.patch text/x-diff 3.5 KB
v1-0002-Collapse-SH_CREATE-into-a-single-definition.patch text/x-diff 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajit Awekar 2026-07-01 12:15:20 Re: Continuous re-validation of session credentials
Previous Message Etsuro Fujita 2026-07-01 12:09:58 Re: use of SPI by postgresImportForeignStatistics