Skip to content

test, raise library line coverage above 95% #285

@steven-varga

Description

@steven-varga

Goal

Raise h5cpp library line coverage from ~82% to >95%.

Context — measure the right denominator first

The CDash Coverage step was counting vendored thirdparty, the test harness, and example TUs (9276 LOC counted vs 2453 real library lines), burying the true figure. Fixed under #278 via CTEST_CUSTOM_COVERAGE_EXCLUDE in CTestCustom.cmake, mirroring the lcov --remove list already used for Codecov. With that scope, the real numbers are:

  • Lines: ~82% (2019/2453)
  • Functions: 95.2% (1387/1457)

Measured locally: gcc-14 --coverage, Debug -O0, HDF5 1.12.3, C++20, 54/54 tests pass.

Gap is concentrated (434 uncovered lines)

Header Uncovered Rate Share
H5Zpipeline_pool.hpp 184 0.0% 42%
H5cout.hpp ~87 37.4% 20%
H5Dappend.hpp ~31 85.6% 7%
H5Zpipeline.hpp ~29 79.1% 7%
H5Dread.hpp ~26 78.7% 6%
H5Ialgorithm.hpp ~16 55.6% 4%
H5Dwrite / H5capi / H5Dopen ~33 8%

H5Zpipeline_pool.hpp (the threaded filter pool) is the keystone: 0% and 42% of the entire gap.

Plan

  1. Dedicated test for H5Zpipeline_pool (threaded filter pool) — model on H5Zpipeline_parallel_read.cpp.
  2. H5cout print/dump-path test.
  3. H5Zpipeline edge branches.
  4. H5Dread / H5Dappend edge paths.
  5. Re-measure; top up H5Ialgorithm / H5Dopen as needed to clear 95%.

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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