Skip to content

No Linux kernel code coverage when using GCC 15 #445

@matttbe

Description

@matttbe

Hello,

I recently switched to GCC 15, and since then, I have no more code coverage.

# lcov --capture --keep-going -j 2 --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1 --include /net/mptcp/ --function-coverage --branch-coverage -b /workspace/mptcp_net-next/.virtme/build -o /workspace/mptcp_net-next/.virtme/results/0d7b92893723/normal/kernel.lcov
Auto-detecting gcov kernel support.
Found upstream gcov kernel support at /sys/kernel/debug/gcov
Copying data to temporary directory /tmp/lyaNu17iw7
Capturing coverage data from /tmp/lyaNu17iw7
geninfo cmd: '/usr/bin/geninfo /tmp/lyaNu17iw7 --toolname lcov --output-filename /workspace/mptcp_net-next/.virtme/results/0d7b92893723/normal/kernel.lcov --keep-going --base-directory /workspace/mptcp_net-next/.virtme/build --ignore-errors mismatch --parallel 2 --branch-coverage --rc geninfo_unexecuted_blocks=1 --include /net/mptcp/'
Found gcov version: 15.2.0
Using intermediate gcov format
Recording 'internal' directories:
        /tmp/lyaNu17iw7
        /workspace/mptcp_net-next/.virtme/build
Writing temporary data to /tmp/geninfo_dat7lqj
Scanning /tmp/lyaNu17iw7 for .gcda files ...
Found 18 data files in /tmp/lyaNu17iw7
using: chunkSize: 7, nchunks:3, intervalLength:0
lcov: WARNING: (mismatch) "/workspace/mptcp_net-next/net/mptcp/protocol.h":594: mismatched exception tag for id 4, 4: '0' -> '1'
        (use "lcov --ignore-errors mismatch,mismatch ..." to suppress this warning)
lcov: WARNING: (mismatch) "/workspace/mptcp_net-next/net/mptcp/protocol.h":600: mismatched exception tag for id 0, 0: '0' -> '1'
lcov: WARNING: (mismatch) "/workspace/mptcp_net-next/net/mptcp/protocol.h":594: mismatched exception tag for id 4, 4: '0' -> '1'
lcov: WARNING: (mismatch) "/workspace/mptcp_net-next/net/mptcp/protocol.h":600: mismatched exception tag for id 0, 0: '0' -> '1'
Finished processing 18 GCDA files
Apply filtering..
Finished filter file processing
Finished .info-file creation
Summary coverage rate:
  source files: 20
  lines.......: 0.0% (0 of 8381 lines)
  functions...: 0.0% (0 of 548 functions)
  branches....: 0.0% (0 of 6085 branches)
Message summary:
  4 warning messages:
    mismatch: 4
Removing temporary directories.

See the 0.0%. Here is the created file: kernel.lcov.gz

There are more examples of .lcov files produced there if needed: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/18831360999 (in the artifacts, starting with lcov-)

I'm using lcov v2.3.1, but I have the same issue with v2.3.2.

I'm not exactly sure what I should look at. The .gcda and .gcno files are not empty:

# cat /sys/kernel/debug/gcov/workspace/mptcp_net-next/.virtme/build/net/mptcp/token_test.gcda | wc -c
16
# cat /sys/kernel/debug/gcov/workspace/mptcp_net-next/.virtme/build/net/mptcp/token_test.gcno | wc -c
15696

If you need more captured files, here is a build with GCC 14, and one with GCC 15. You can see the 0.0% in the summary, and the capture files are in the artifacts, starting with lcov-.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions