Repository navigation
Make audio device watchdog tests independent of scheduler delays - #2113
Open
thehobbit85 wants to merge 1 commit into
Open
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mocked audio-device test assumes a successful start without callbacks will stop the device within three wall-clock seconds. The watchdog deliberately restarts its timeout after a late wake, so that assumption fails when its thread is delayed. Delaying watchdog sleeps to 250 ms reproduces the
blocked_startassertion reported by #948's sanitizer job on unchanged main. This demonstrates the fixture defect; the historical job has no scheduler trace establishing its exact delay pattern.Extract the unchanged registry-tick body into
au_watchdog_tickand drive it explicitly in the mocked-device fixture. Production retains its 50 ms loop, clock read under the registry lock, callback timeout, retries and statistics drain. Independent review verified that inlining the helper restores the entire previous production source, apart from whitespace and its new comment.The test now checks twelve late wakes, the exact one-second no-callback boundary, and the state immediately before and at each retry deadline. It still exercises the real asynchronous start worker, callback hold/handoff, silent sink, suspend/resume, reset and close. The long handoff buffer is consumed through the callback before a separate 10 ms buffer checks real silent-sink release, keeping simulated watchdog time independent of PCM pacing. Existing waits and pointer assertions remain; there are no suppression or baseline changes.
Validation on Apple M2 Max, macOS 26.6, Xcode 27.2, Apple Clang 21, Python 3.14.6 and LLVM 23.1.4:
010015100B514000) Mac host rebuild passed. Final changed-file C lint has zero new findings; the production file has none.t_pso_archive.mnullable marker write already covered by t_pso_archive's cold-quit marker write is nil-safe: lint-c's clang-tidy ratchet is green on main again #2080. Full Python lint has 339 findings against 336 baseline, solely the unchangeddmsh_build.pyname collision covered by Fix shader-tool lint and stale shader test fixtures #2111. Both files are byte-identical to this PR's base. Shared fixes remain separate.nvn_mtl.munknown-kind?collision covered by test_dmsh_abi's ratchet no longer counts "?": the unknown binding kind is also what log lines write for a name they do not have, and the third such placeholder in nvn_mtl.m fails the Tool tests on main (issue #1656) #1981); all 52 iOS unit tests passed. No shared fix is folded into this PR.regress.py impact 6c676444..HEAD: zero direct or broad matches, four unaffected manifests and 149 unknown profiles. This is a mapping result, not gameplay evidence. A fullregress.py checkwas attempted for Super Mario Odyssey, Breath of the Wild, Tears of the Kingdom, Pokémon Scarlet and Luigi's Mansion 3, covering Nintendo EPD, Game Freak and Next Level Games audio users; it stopped with exit 2 becauseREGRESS_ROOTandREGRESS_GAMESare not configured. No game shader rebuild, gameplay, device or performance validation is claimed; other games are unchecked.Independent review found and resolved the real-buffer timing coupling, then reported no remaining blocking findings on the final diff. No player-facing audio behavior, shader-chain version, game profile or front-end contract changes.