I wrote:
> Our process swaps steps 1 and 2. What I now suspect is that
> we accidentally get away with that for basic mode, but it
> doesn't work with lcov_branch_coverage.
I tested that theory by manually doing things in the "correct" order,
and it didn't change the results:
$ /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
$ make check
...
$ /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
$ 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"> 10186 : 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>
I'm still a bit suspicious that we may have a process problem,
but it's looking like there may be grounds for an lcov bug
report.
regards, tom lane