Repository navigation
[Tests] Round 3: job-wake waiters, font factory, remote hold bound, late first-frame poll - #73
Merged
Merged
Conversation
…test ends
The waiters were thread-pool items that block for up to 10 s. In a full parallel Libs run
the pool is saturated by other blocking tests and injects threads slowly, so a waiter could
start more than 5 s late ("the waiter never went to sleep"). Its late start then left it
asleep in the process-wide sleeper mask, where the next test's wake over the other workers'
bits woke it ("Expected 0, Actual 2").
Reproduced with every pool worker blocked: all three waiter tests fail with the same message
before, pass after.
The exports read the process-wide factory, which only FontExportsTests and FontWritingTests installed; a filtered run without them failed two tests with "No guest font factory was selected". Before: 2 of 13 fail alone; after: 13 of 13.
…margin ALongSleepIsHeldWhileTheRemoteWaitsAndReturnsWhenItEnds asserted the sleep returned within grace + 1 s of the end; a full Libs run measured 2.43 s. The product's held sleep reads the remote every 4 ms and returns at the first read past LastEnd + grace, so anything past that is a thread (the sleeper, or the test before it published) not running. The case the bound guarded against, a sleep that missed the end, now returns only at an explicit 30 s max hold and is still told apart. The failure message reports the publish delay and the GC pause time across the interval, to say which next time.
… its end FirstFrameWaitsUntilPresentationStarts waited 10 s for frame 2 of a two-frame, 2 fps movie. When the test thread is held up for more than 0.5 s after it starts the clock (a full Libs run froze the test process for seconds to tens of seconds: the same moment failed HostCompileStall and GameLibraryWatcher tests), the next poll swaps in frame 2 and, its time already over, finishes the playback in the same call and returns false. That is the documented product behaviour (a frame the clock has passed is never shown), so the test now accepts either a later frame or a playback finished with its clock past the movie's duration. The theory case pollDelayMs=1100 fails with the old assertion exactly as the full run did (current=1 decoded=2 finished=True) and passes now. MediaFramePlayback.DescribeState, an internal diagnostic, is printed by the frame waits' timeouts (queued and decoded frames, decoder thread, which clock and where it stands).
📦 Build artifacts —
|
| Platform | Download |
|---|---|
| macOS (osx-x64) | sharpemu-osx-x64-0c8d7d5 |
| macOS app bundle (osx-x64) | sharpemu-osx-x64-app-0c8d7d5 |
From build run #556. Downloads require a GitHub login and expire after 90 days.
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.
Before submitting
Please read our contribution guidelines before opening a pull request:
➡️ CONTRIBUTING.md
By opening this pull request, you confirm that you have read and agree to follow the contribution guidelines.
What this changes
Four intermittent Libs test failures, one commit each. All four are test-side changes. The only product file touched is MediaFramePlayback.cs, which gets an internal diagnostic method (DescribeState) and no behaviour change.
Not changed, already fixed on main: the ParallelProgramPrefetch interrupt NRE (137530a) and the ResourcePreparationAllocationTests 5784 B case (it predates e9c4109).
Unverified: the media and HostCompileStall failures line up with test-process freezes of seconds to tens of seconds in full Libs runs on a heavily loaded machine. In one run, three unrelated tests failed within 0.4 s of each other. What causes the freeze is not known. Other wall-clock tests can still fail under such a freeze.
Testing
N/A (tests only, plus an internal diagnostic). REUSE lint passes. The Release build has 0 errors. Full
dotnet test SharpEmu.slnx -c Release: every project passes except Libs, which has 12630 passed and 1 failed. The failure is SeatbeltSandboxProbeTests (AudioOutputUnitStart OSStatus 2003329396), a known local CoreAudio failure that this change does not touch. Class loops: 15 runs of the changed classes beside all Audio classes, 0 failures in the changed classes. The MacCoreAudioDeviceTests "device never consumed" failure appears in 10 of 15 loops both before and after this change. It is a separate, open issue.No game was run.
Checklist
By submitting this pull request, you confirm that:
CONTRIBUTING.md.N/A.N/A).