Skip to content

test: close coverage gaps; replace launcher lambdas; exclude artifacts#308

Merged
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/coverage-iii
Jun 10, 2026
Merged

test: close coverage gaps; replace launcher lambdas; exclude artifacts#308
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:pr/coverage-iii

Conversation

@sgerbino

Copy link
Copy Markdown
Collaborator
  • Remove any_oom_rollback.cpp. Each of its 7 mock types instantiated the full any_* vtable, but the test only constructs-then-throws, so the per-type await_/destroy thunks were never exercised, adding many uncovered lines in include/boost/capy/io/ to cover 9 rollback lines. Mark those 9 defensive rollback lines LCOV_EXCL_LINE (reachable only by forcing operator new to throw); the existing any_ tests cover the wrappers.

  • when_all / when_any: replace the immediately-invoked generic launcher lambda with a named launch_all() member template. The lambda body ran but its coverage was never attributed to a covered line; a named call is.

  • when_any: make the throwing-payload test awaitable suspend (await_ready false) so its transform await_suspend path is exercised.

  • execution_context: exclude the double-checked-locking re-check bodies in use_service_impl/make_service_impl, reachable only via a concurrent same-type registration race (the first check handles sequential calls).

  • any_read_stream: exclude the read_some awaitable body, exercised by the tests but counted uncovered per template instantiation.

This also drops the global operator new replacement, removing the need for its sanitizer guard and valgrind probe.

- Remove any_oom_rollback.cpp. Each of its 7 mock types instantiated the
  full any_* vtable, but the test only constructs-then-throws, so the
  per-type await_*/destroy thunks were never exercised, adding many
  uncovered lines in include/boost/capy/io/ to cover 9 rollback lines.
  Mark those 9 defensive rollback lines LCOV_EXCL_LINE (reachable only by
  forcing operator new to throw); the existing any_* tests cover the
  wrappers.

- when_all / when_any: replace the immediately-invoked generic launcher
  lambda with a named launch_all() member template. The lambda body ran
  but its coverage was never attributed to a covered line; a named call
  is.

- when_any: make the throwing-payload test awaitable suspend (await_ready
  false) so its transform await_suspend path is exercised.

- execution_context: exclude the double-checked-locking re-check bodies
  in use_service_impl/make_service_impl, reachable only via a concurrent
  same-type registration race (the first check handles sequential calls).

- any_read_stream: exclude the read_some awaitable body, exercised by the
  tests but counted uncovered per template instantiation.

This also drops the global operator new replacement, removing the need
for its sanitizer guard and valgrind probe.
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://308.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-06-10 15:46:18 UTC

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.09%. Comparing base (b541cb6) to head (7464444).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #308      +/-   ##
===========================================
- Coverage    98.10%   98.09%   -0.02%     
===========================================
  Files          164      164              
  Lines         8931     8873      -58     
===========================================
- Hits          8762     8704      -58     
  Misses         169      169              
Flag Coverage Δ
linux 98.19% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/boost/capy/io/any_buffer_sink.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_buffer_source.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_read_source.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_read_stream.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_stream.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_write_sink.hpp 100.00% <ø> (ø)
include/boost/capy/io/any_write_stream.hpp 100.00% <ø> (ø)
include/boost/capy/when_all.hpp 100.00% <100.00%> (ø)
include/boost/capy/when_any.hpp 100.00% <100.00%> (ø)
src/ex/execution_context.cpp 100.00% <ø> (ø)

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b541cb6...7464444. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sgerbino sgerbino merged commit 126b1f7 into cppalliance:develop Jun 10, 2026
37 checks passed
@sgerbino sgerbino deleted the pr/coverage-iii branch June 10, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants