Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> In the coverage.pg.org box, we have:
> $ cat .lcovrc
> lcov_branch_coverage = 1
Oh, that's critical information not mentioned before :-(.
On my Fedora 26 box (gcc 7.3.1) I can reproduce the problem after
setting up ~/.lcovrc that way:
$ grep bogus coverage/src/backend/optimizer/util/predtest.c.*
coverage/src/backend/optimizer/util/predtest.c.gcov.html:<span class="lineNum"> 492 </span> :<span
class="lineCov"> 10208 : elog(ERROR, "predicate_classify returned a bogus value");</span>
coverage/src/backend/optimizer/util/predtest.c.gcov.html:<span class="lineNum"> 803 </span> :<span
class="lineCov"> 59482 : elog(ERROR, "predicate_classify returned a bogus value");</span>
(note "lineCov" instead of expected "lineNoCov"). This happens
with either lcov 1.12 or 1.13. I also notice an interesting
warning with either version:
$ make coverage-html
/usr/bin/lcov --gcov-tool /usr/bin/gcov -q --no-external -c -i -d . -d . -o lcov_base.info
geninfo: Note: --initial does not generate branch coverage data
/usr/bin/lcov --gcov-tool /usr/bin/gcov -q --no-external -c -d . -d . -o lcov_test.info
rm -rf coverage
/usr/bin/genhtml -q --legend -o coverage --title='PostgreSQL 11devel' --num-spaces=4 --prefix='/home/tgl/pgsql'
lcov_base.infolcov_test.info
touch coverage-html-stamp
No idea what "--initial" refers to, but it suggests that we're
misusing the tool somehow with this configuration.
regards, tom lane