Skip to content

test(quic): expand internal/quic_socket.cpp coverage to 80% line / 70% branch #1065

Description

@kcenon

What

Expand unit-test coverage of src/internal/quic_socket.cpp from 43.7% line / 21.3% branch to >= 80% line / >= 70% branch (per coverage.yml).

This file currently has no dedicated, narrowly-scoped test expansion; it is a new target identified in the 2026-04-26 re-measurement.

Why

Where

  • File: src/internal/quic_socket.cpp (~439 lcov-executable lines)
  • Tests: extend tests/test_quic_socket.cpp
  • Coverage workflow: .github/workflows/coverage.yml

How

Technical Approach

  1. Read quic_socket.cpp / quic_socket.h to enumerate API and error branches.
  2. Use the 2026-04-26 lcov report for uncovered lines/branches.
  3. Add tests for:
    • Datagram send/recv error mapping (Result<T> paths)
    • PMTU probing edge cases
    • ECN marking and feedback handling
    • Path validation / migration error paths
  4. Use existing QUIC fixtures (loopback datagram transport); no real network.

Acceptance Criteria

  • src/internal/quic_socket.cpp line coverage >= 80%
  • src/internal/quic_socket.cpp branch coverage >= 70%
  • Tests pass on Ubuntu/macOS/Windows CI
  • Sanitizer builds (ASAN, TSAN, UBSAN) pass
  • Post-merge coverage delta recorded on Expand unit test coverage from 40% to 80% #953

Part of #953

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions