Skip to content

Sound tests wait for the tap writers and the decode ring, not a sleep - #3037

Merged
samwhosung merged 1 commit into
mainfrom
sess/sound-test-waits
Nov 20, 2026
Merged

samwhosung merged 1 commit into
mainfrom
sess/sound-test-waits

Conversation

@samwhosung

Copy link
Copy Markdown
Owner

Two sound tests waited a fixed time for another thread's work, which a loaded machine can outlast.

The probe self-test slept 900 ms for the tap writers to finish their WAVs. mix_tap::install_at now returns each writer's thread with its frame clock, MainChain carries them, and the test joins them after dropping the manager: each writer drains, patches its header and ends once its tap is gone. A live run still detaches them.

The streamed-loop test slept 200 ms for kira's decode ring. kira zero-fills a whole 128-frame chunk without advancing while that ring is short, so the test now renders chunk by chunk, skips all-silent chunks, and asserts on two and a half loops of sound. A loop that stops at its end fails at a 120 s hang bound.

Fixes #3034

🤖 Generated with Claude Code

…f sleeping

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samwhosung
samwhosung merged commit dbc37d6 into main Nov 20, 2026
@samwhosung
samwhosung deleted the sess/sound-test-waits branch November 20, 2026 09:47
ornfelt added a commit to ornfelt/benilla that referenced this pull request Nov 20, 2026
Upstream: https://github.com/samwhosung/benilla

Upstream changes:
- Mouse pick skips texture units flagged 0x08 (samwhosung#3032, the fork's own 11a21a6 upstreamed), and a unit's skinned parts flagged 0x08 leave the posed pick too (samwhosung#3036)
- Script calls keep the host's SystemState between exclusive entries (samwhosung#3026)
- Chat: held lines kept in a BTreeMap, so a release pass no longer shifts them (samwhosung#3025)
- Sound tests join the tap writers and wait on the decode ring instead of sleeping (samwhosung#3037)
- Timing tests hold on a loaded machine (samwhosung#3035)

Conflicts resolved:
- crates/benilla-world/src/interact/pick.rs: the same 0x08 pick change on both sides, differing only in rustfmt layout of one assert; took upstream's, so the file matches upstream
ornfelt added a commit to ornfelt/benilla that referenced this pull request Nov 20, 2026
…ung#3032, samwhosung#3035, samwhosung#3036, samwhosung#3037 and the fork's merge) - no conflicts, nothing adapted: the branch's difference from main is byte-identical before and after (feature-off path still equals main), no gfx trigger (pick, hover, chat feed, script-call state cache, timing and sound tests); cargo check --workspace --all-targets with and without gfx clean, benilla-world pick and terrain_stream, benilla-formats m2_no_hit_test and m2_billboard_card_face and benilla-app hover, chat feed, sound, frame_step, server_alert, cvars, attach and script_calls tests with gfx green at dev-fast (script_calls' eight_nested_switches_fit_a_two_megabyte_stack overflows its 2 MB thread at dev-fast's opt-level 0, with and without gfx, and passes at dev with gfx), built on Windows only
ornfelt added a commit to ornfelt/benilla that referenced this pull request Nov 20, 2026
…ung#3032, samwhosung#3035, samwhosung#3036, samwhosung#3037 and the fork's merge) - one conflict, in the branch's gfx-only stall test (frame_step_tests.rs): upstream's 8 + 2 frames measured from `since` are taken on the branch's plain `app.update()` frame, the comment naming gfx's frame-start stamp; no gfx trigger (pick, hover, chat feed, script-call state cache, timing and sound tests), no schedule change (frame test green); cargo check --workspace --all-targets clean, benilla-world pick and terrain_stream, benilla-formats m2_no_hit_test and benilla-app frame, frame_step, hover, chat feed, sound, server_alert, cvars, attach and script_calls tests green at dev-fast (script_calls' eight_nested_switches_fit_a_two_megabyte_stack overflows its 2 MB thread at dev-fast's opt-level 0 on main's code too and passes at dev on gfx-dll-backend), built on Windows only
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.

Two mixer tests wait a fixed time for a writer or decode thread's work

1 participant