Skip to content

test(rtp_recv): add end-to-end smoke test exercising threads + GL #204

@osamu620

Description

@osamu620

Background

open_htj2k_rtp_recv --smoke-test currently runs four unit-style
tests against individual components (UDP socket, RFC 9828 parser,
YCbCr→RGB helper, frame reassembler). None of them touch:

  • The three-thread pipeline (receive / decode / render)
  • The RTP-timestamp pacer
  • The GL 3.3 core shader programs
  • The AVX2 YCbCr path's end-to-end integration
  • Shutdown sequencing (stop_flag propagation, thread join order)

Regressions in any of those surfaces are only caught by running the
binary against a live sender — which isn't practical in CI.

Proposal

Add a self-contained end-to-end smoke test that:

  1. Forks (or spawns via std::thread) the existing Python loopback
    helper — or reimplements the minimal RFC 9828 sender inline to
    avoid the Python dependency in CI.
  2. Sends a handful of frames (e.g. 10) of a small known codestream
    (conformance_data/ds0_ht_01_b11.j2k) into the threaded receiver
    with --threading on, --frames 10, --no-render.
  3. Verifies: exit status 0, frames_decoded == 10, frames_failed == 0,
    zero decode-slot / render-slot evictions, non-empty decode-time
    stats.
  4. Repeats with --color-path cpu to cover the AVX2 path end-to-end.

A headless CI runner won't have GL, so --no-render is the correct
default for this test. A separate --render smoke for GL paths can
be added later, gated on a display environment variable.

Acceptance

  • New smoke test is wired into --smoke-test or a new --e2e-test
  • Runs to completion in <30 s without external network
  • Works in a headless environment
  • Flags: both --color-path shader (if GL available) and --color-path cpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions