doc: Add test coverage troubleshooting tip #31755

pull espi3 wants to merge 1 commits into bitcoin:master from espi3:doc-dev-notes changing 1 files +18 −0
  1. espi3 commented at 8:21 am on January 29, 2025: none

    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.

  2. doc: Add test coverage troubleshooting tip
    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
    produces geninfo mismatch errors of the following sort (Ubuntu 24.04,
    g++ compiler):
    
    ```
    geninfo: ERROR: mismatched end line for _ZN7Num30723SerI10DataStreamEEvRT_RKS_ at /home/espi3/src/bitcoin/src/crypto/muhash.h:62: 67 -> 62
            (use "geninfo --ignore-errors mismatch ..." to bypass this error)
    CMake Error at build/CoverageInclude.cmake:45 (execute_process):
      execute_process failed command indexes:
    
        1: "Child return code: 1"
    
    Call Stack (most recent call first):
      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:
    
    ```
    geninfo: ERROR: Unexpected negative count '-185' for /home/espi3/src/bitcoin/src/secp256k1/src/field_5x52_impl.h:183.
            Perhaps you need to compile with '-fprofile-update=atomic
            (use "geninfo --ignore-errors negative ..." to bypass this error)
    CMake Error at build/Coverage.cmake:21 (execute_process):
      execute_process failed command indexes:
    
        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.
    b21ca42a3e
  3. DrahtBot commented at 8:21 am on January 29, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31755.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Docs on Jan 29, 2025
  5. espi3 commented at 4:33 am on February 5, 2025: none
    Closing, as the troubleshooting tips in this PR are too narrow. I ran the same commands on MacOS and got an entirely different set of lcov errors.
  6. espi3 closed this on Feb 5, 2025

  7. espi3 deleted the branch on Feb 5, 2025


espi3 DrahtBot

Labels
Docs


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-02-07 18:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me