This PR adds troubleshooting information to explain how to overcome two errors that may arise when running the tests with coverage as described in doc/developer-notes.md
.
Specifically, running the cmake -P build/Coverage.cmake
step may produce geninfo mismatch errors of the following sort (Ubuntu 24.04, GNU 13.3.0 compiler, LCOV version 2.0-1):
0$ cmake -B build -DCMAKE_BUILD_TYPE=Coverage
1$ cmake --build build
2$ cmake -P build/Coverage.cmake
3
4geninfo: ERROR: mismatched end line for _ZN7Num30723SerI10DataStreamEEvRT_RKS_ at /home/espi3/src/bitcoin/src/crypto/muhash.h:62: 67 -> 62
5 (use "geninfo --ignore-errors mismatch ..." to bypass this error)
6CMake Error at build/CoverageInclude.cmake:45 (execute_process):
7 execute_process failed command indexes:
8
9 1: "Child return code: 1"
10
11Call Stack (most recent call first):
12 build/Coverage.cmake:5 (include)
This may be due to multiline macros such as SERIALIZE_METHODS
, so I would expect others to run into the same issue.
Additionally, after suppressing the mismatch errors, I get a geninfo negative count error:
0geninfo: ERROR: Unexpected negative count '-185' for /home/espi3/src/bitcoin/src/secp256k1/src/field_5x52_impl.h:183.
1 Perhaps you need to compile with '-fprofile-update=atomic
2 (use "geninfo --ignore-errors negative ..." to bypass this error)
3CMake Error at build/Coverage.cmake:21 (execute_process):
4 execute_process failed command indexes:
5
6 1: "Child return code: 1"
I don’t know the cause, and don’t yet know enough C++ to investigate it properly. This PR takes the approach of describing a workaround.