Skip to content

tests: [62] audio capture flakes when the real capture device opens but delivers nothing (all 38 audio checks lump-fail) #876

Description

@InauguralPhysicist

tests/test_audio.eigs's capture block distinguishes "no device" (12 held-count skip asserts) from "device works" — but not the middle case: a device that OPENS but delivers zero samples within the 2s bounded poll (suspended/held PulseAudio source, another process holding the mic). On the dev box this reproduces ~2 in 3 runs against the real driver:

FAIL: capture accumulates samples — expected true
FAIL: capture keeps accumulating after a drain — expected true
Tests: 53 | Pass: 51 | Fail: 2

and because [62] lump-counts, the suite reports 38 failed for 2 environmental checks. Under SDL_AUDIODRIVER=dummy it is 3/3 deterministic (dummy capture provides silence at cadence).

An opened-but-silent device is an environment statement, not a runtime bug — the delivery-dependent asserts (accumulates, full-chunk cap, in-range, drain-terminates, re-accumulates) should SKIP with the count held constant, per the existing no-device convention in the same file. Forcing dummy audio for [62] would also de-flake but loses real-driver coverage on boxes where capture works.

Observed 2026-08-05 during the #828 landing; same signature caused an unexplained 38-fail run earlier the same day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions