Skip to content

gcov plugin reports "Found no coverage results" when source file pulls in instrumented system headers #1161

Description

@rickymohk

The gcov plugin emits a false "Found no coverage results" warning for source files whose compilation causes gcov to produce multiple File '...' entries in its output (e.g. a source file that uses FILE*, pulling in an instrumented system header like _stdio.h). The plugin only inspects the first File '...' entry, which may be a system header rather than the actual source file.

Steps to Reproduce

Have a source file that references FILE* (e.g. a custom fputc implementation):

// debug.c
int fputc(int ch, FILE *f) {
    HAL_UART_Transmit(...);
    return ch;
}

Write a test for it and run ceedling gcov:test_debug.
All tests pass, but the summary prints:

⚠️ WARNING: Found no coverage results for test_debug::debug.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions