Tests: verify the finest timer request without timing Sleep #3193
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3193"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by gefydev on 2026-11-28T17:59:45Z.
Replace the scheduler-sensitive timer test reported in #3180. The old average Sleep(1) threshold depended on scheduling delays on shared Windows runners.
An alternative to #1628, which keeps the Sleep(1) timing check and takes the fastest sample. This one drops the timing dependence and tests the period selection directly.
What is in it
Tested
Regression run
Same title, 45 seconds, shader preparation disabled in both runs.
Not tested
This test does not measure scheduler latency or occluded-window sleep behavior. AMD and other adapters were not tested.
AI use
Codex (gpt-6.2-sol) implemented the change, wrote and ran the tests, and drafted this description.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-28T18:24:18Z.
Tested
Independently reran the pinned standalone CPU executable at
4070c4efb91cb985ca83419ad1a19bb6792ca708on Windows 11 x64 build 26200.9974 with a Ryzen 7 3800X. The executable was built with Rust 1.100.1 (x86_64 MSVC). I verified that the helper, native query declaration, and stock control matched the pinned Git source.Ran
timer_verify.exe --exact FILTER --nocapture --test-threads=1 --color=neverin three fresh processes, usingnative_query_selects_finest_period_with_injected_setter,synthetic_ntstatus_boundaries, andfine_timer_requests_the_finest_supported_period. All three exited 0. Total was 3 passed, 0 failed, 0 ignored, 0 skipped.The read-only
NtQueryTimerResolutionreturned status 0, coarsest and prior periods of 156250, and a finest period of 5000 (100 ns units). The helper called the injected setter once with 5000 and returned(156250, 7777, 0), retaining the queried prior period and the injected output and status. The synthetic test accepted query status0x40000000, propagated setter status0x40000001, and suppressed the setter on query failure0xC0000001. The stock control passed separately.Not tested
Native timer setters, power policy, scheduler or Sleep behavior, runtime integration, GPU, retail smoke, and the Cargo workspace suite. Every setter in this run was injected.
AI use
T3 Code through Codex (
gpt-6.2-sol, high) prepared the standalone harness, verified source and executable pins, independently reran the tests, and drafted this report.Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T23:11:28Z.
merge-check claim
head:
4070c4efb9Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T23:19:46Z.
merge-check
base:
86e86fcb33head:
4070c4efb9merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2889 passed, 0 failed, 51 ignored; 28 SKIPPED lines, as on the base; failing: none. The base alone, same run: 2889 passed, 0 failed, 51 ignored, 28 SKIPPED lines (22 no wave64, 2 no heap windows, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 cannot disable the driver cache). The new test
hle::kernelx::tests::fine_timer_requests_the_finest_supported_periodran and passed.review: no blocking finding; one file (+35/-15), every line read.
fine_timerkeeps its calls and their order: the query and set of the timer resolution move intorequest_finest_timer, which takes them as closures, and the log lines and the early return on a failed query or a zero period are unchanged. The new test drives that helper with fake query / set calls (finest period requested, failed set reported, failed query and zero period returnNone). One thing for the maintainer to weigh, not blocking: the removed test was the only one that called the realfine_timer()and measuredSleep(1); after this PR nothing in the suite checks that the request has an effect on Windows. That is the stated trade against the timing dependence (#1628 is the alternative that keeps the measurement).performance: none: the runtime path makes the same two system calls once at start.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T01:03:00Z.
merge-check claim
head:
4070c4efb9Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T01:05:18Z.
merge-check claim
head:
4070c4efb9Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T01:09:27Z.
merge-check
base:
d0832e614fhead:
4070c4efb9merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2889 passed, 1 failed, 51 ignored; 29 SKIPPED lines
failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:29:35Z.
merge-check
base:
7d86c5d2b7head:
4070c4efb9merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2896 passed, 0 failed, 51 ignored; SKIPPED: 28 (20 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 1 no heap windows, 1 cannot disable the driver cache, 3 others; the same set as on main); failing: none
review: read the whole diff (kernelx.rs, +35/-15). The refactor keeps the old behaviour (same NT calls in the same order, same log lines, same early return on a failed query or a zero period), and the new assertions aren't tautological: three distinct values (156_250 / 5_000 / 10_000) show the finest period is requested,
wasis the current period, the set status is passed on, and set isn't called after a failed query or a zero period. Findings: (1) one coverage loss: nothing in the suite callsfine_timer()or the realNtQueryTimerResolution/NtSetTimerResolutionany more, so the wiring at ~1772-1775 (the query closure's argument order and the1= set passed to NtSetTimerResolution) is untested; a0there or swapped coarsest / finest would leave titles on the 15.6 ms tick with a green suite. That's the trade the PR states. (2) #1628 (still open) covers the same test by keeping the measurement; one of the two should be closed. (3) The ready-to-merge label partly rests on a check that reports 1 failure yet says "safe to merge" and says there was no line-by-line review.performance: 60 s smoke of a retail title, main
7d86c5d2vs this merge (5ec825b3): 1663 -> 1657 frames shown (99 %; last presents per 2 s: 61 60 60), peak commit 17153 -> 17078 MB, 0 device removals, 0 crashes.verdict: safe to merge (with the noted coverage trade: fine_timer()'s wiring to the real NT calls is no longer tested; one of this and #1628 should be closed)
hardware / tool and model: RTX 5070 Ti (driver 621.14), Ryzen 7 7800X3D, Windows 11 26300 / Claude Code with Claude Opus 5.5
AI-written and posted by Foniass without a human check of each point.