Repository navigation
tests: make poll-wait checks independent of CI scheduling - #779
Closed
thehobbit85 wants to merge 1 commit into
Closed
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
2 tasks done
thehobbit85
force-pushed
the
codex/fix-pollwait-ci-timing
branch
from
October 31, 2026 10:35
0d8d04b to
d1d666b
Compare
thehobbit85
force-pushed
the
codex/fix-pollwait-ci-timing
branch
from
October 31, 2026 12:42
d1d666b to
ce3f2cf
Compare
seedds
added a commit
that referenced
this pull request
Oct 31, 2026
The fixture could miss backoff when CI descheduling broke every short polling run. Control its classification clock while keeping real SVC wait and wake paths, and check threshold, gap and reset boundaries. Co-authored-by: Eliran Zach <4012041+thehobbit85@users.noreply.github.com>
Owner
|
Landed on The design fits the project: controlling the fixture's poll-classification clock removes its dependence on CI scheduling while retaining real SVC wait and wake paths and leaving production timing policy unchanged. Standards and spec reviews found no issues. Validation on Apple silicon:
Confidence is high. This is a general root-cause test fix, with no game-specific behavior or runtime workaround. Eliran Zach is credited with a The identical polling-test prerequisite included in #730 is now on |
This was referenced Oct 31, 2026
2 of 3 tasks
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.
What and why
The shared host unit test can report
FAIL: the same with WaitSynchronization (0 steps in 20 ms)even when the polling policy is correct, as in this CI run on #730.poll_wait_begindeliberately starts a new run after more than 20 µs between polls. A scheduled-out CI process can therefore finish the fixture's 20 ms wall-clock window without ever reaching the uninterrupted 2 ms run needed for backoff.Make only
t_pollwait.ccontrol the clock used to classify poll runs. The fixture continues through the real condition-variable, SleepThread, and WaitSynchronization SVC paths, and checks no backoff before 2 ms, backoff at exactly 2 ms, the 20 µs gap boundary, and resets after another SVC or a successful wait. Production sources and timing policy are unchanged.The signal case now verifies that the requested deadline was actually lengthened to 250 µs, then coordinates a real condition wait and SVC signaller. That case uses an untimed pthread wait so the assertion concerns wake behavior even if CI schedules the signaller late; other waits retain their real clock and timed pthread waits. The existing 20-second process watchdog bounds a broken wake. The previous signal case could pass without ever entering backoff.
Checked
Rebased onto main
3d247f350af29e2761d8f244ff5052dabcf029b1; current head isce3f2cf8ca70a9faa74cccc5b7691dfe8ca7d244.git range-diffconfirms the fix is unchanged. Main added Mac fullscreen readiness and documentation; the fixture, its production polling dependencies, graphics sources, and test/lint workflows remain byte-identical to the previously validated head.Fresh local checks on the rebased head:
build/t_pollwaitwithmake -B -C dm/host/tests GAME=010015100B514000 PYTHON=/opt/homebrew/bin/python3 build/t_pollwait, then ran it: all six cases passed./opt/homebrew/bin/python3 -m unittest dm/tools/tests/test_docs.py: all 11 tests passed.git diff --check: passed; worktree clean.ce3f2cf8ca70a9faa74cccc5b7691dfe8ca7d244is pending; the results below belong to earlier heads.Historical validation retained for the unchanged fixture and host inputs (not rerun during this rebase):
All 7 CI checks passed on previous head
d1d666b3660df8bacc53f63ce3242928bfa343a5: host/CPU graphics, sanitizers, coverage, tool tests, Mac/gfx/iOS builds, and the unsigned iOS smoke app, plus clang-tidy.The following local validation was completed on original head
0d8d04bf20476df54e758e95eebcf59b1d4e9c47, whose polling fixture and dependencies are unchanged:make -C dm/host/tests GAME=010015100B514000 PYTHON=/opt/homebrew/bin/python3 run— passed.make ... asan) — passed.git diff --checkanddm/tools/lint_c.py compdbpassed. Localtidycould not run becauseclang-tidyis not installed; previous-head CI clang-tidy passed.Docs