On 1/29/25 02:00, Michael Paquier wrote:
On Wed, Jan 15, 2025 at 07:51:39PM -0500, Peter Geoghegan wrote:
I was able to get the lcov git master branch's tip to produce a
Postgres coverage report (same compiler version and OS as before).
Unfortunately, I had to use an even grottier incantation to get this
to work:
make -s coverage-html GENHTML_FLAGS="-q --legend --ignore-errors
unmapped,unmapped,empty,empty,inconsistent,inconsistent,corrupt,corrupt,range,range"
LCOVFLAGS="--ignore-errors
empty,empty,negative,negative,inconsistent,inconsistent"
(As you can imagine, I came up with this through pure trial and error.)
Interesting. These tricks do not seem to work here with a Debian GID
host, unfortunately. I'll try to dig a bit more, this is getting very
annoying :(
hmm this is now also breaking coverage.postgresql.org (after an upgrade
to the current debian trixie):
make: Leaving directory
'/home/coverage/pgsrc/pgsql/src/interfaces/ecpg/test'
/usr/bin/lcov --gcov-tool /usr/bin/gcov -q --no-external -c -i -d . -d .
-o lcov_base.info
lcov: WARNING: (deprecated) RC option 'lcov_branch_coverage' is
deprecated. Consider using 'branch_coverage'. instead.
(Backward-compatible support will be removed in the future.)
(use "lcov --ignore-errors deprecated,deprecated ..." to
suppress this warning)
Message summary:
1 error message:
usage: 1
1 warning message:
deprecated: 1
lcov: ERROR: (usage) duplicate file ./src/fe_utils/astreamer_gzip.gcno
in both . and .
(use "lcov --ignore-errors usage ..." to bypass this error)
make: *** [src/Makefile.global:1064: lcov_base.info] Error 1
This seems to be basically the same issue that Andres patch in this
thread tries to address by removing one of the -d - applying a similar
hack locally seems to help a bit until we are running into one of the
other reported issues:
lcov: WARNING: (inconsistent)
/home/coverage/pgsrc/pgsql/contrib/bloom/blinsert.c:274: unexecuted
block on non-branch line with non-zero hit count. Use "geninfo --rc
geninfo_unexecuted_blocks=1 to set count to zero.
(use "lcov --ignore-errors inconsistent,inconsistent ..." to suppress
this warning)
lcov: ERROR: (negative) Unexpected negative hit count '-5' 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)
Message summary:
1 error message:
negative: 1
2 warning messages:
deprecated: 1
inconsistent: 1
make: *** [src/Makefile.global:1069: lcov_test.info] Error 1
While I certainly can try to locally hack around that further to get it
build it feels wrong to post process/patch our own tree to get
"official" coverage reporting...
Stefan