Repository navigation
test(libkernel): run guest_timed_wait_cpu alone on Windows - #13710
Conversation
guest_timed_wait_cpu aborts on the Windows CI runner after printing the scePthreadCondTimedwait(500 us) CPU line (job 124274871982, main 37277ea). The test requires the 99th percentile of each set of waits under 3 ms and the longest under 10 ms. ctest runs it with --parallel 4 beside tests such as guest_usb_storage, guest_nanosleep_long_request and the guest_raise tests. Their threads keep the runner's CPUs busy, so a woken waiter can wait more than a scheduler quantum before it runs: a failing run measured a 13.25 ms condition wait and a 23.3 ms usleep. The test now runs with RUN_SERIAL on Windows, as guest_pthread_start and audio_out2_timing do. The bounds are unchanged.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Re-checked — test execution not verified
The CMake change appears valid, but the exact-head Windows workflow did not run guest_timed_wait_cpu; it reported that no guest core/libs test sources changed.
What I ran
Reviewed head a0e3da6c493749db7a5ad4e96371dec59979a315 against PR base 539c3425f886a9fed61f8e33448e09f21504be91. Current main is e2df06e661f94d6e63b8f6622c8c58507b0245c1; the exact-head merge preview was clean. Environment: Debian 12 x86-64, Python 3.11.2, GCC 12.2.0. No local build or test was run.
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13710
python3 tools/check_test_registration.py --scripts
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/libs/prx/libkernel/CMakeLists.txt
python3 tools/pr_stack_check.py 13710 --repo boykopovar/AnyPS5
gh pr checks 13710 --repo boykopovar/AnyPS5
gh run view 41156230070 --repo boykopovar/AnyPS5 --job 124404529783 --log | grep -F 'No guest core/libs test sources changed'Results
| Check | Result |
|---|---|
| Diff and conventions | Passed. The one-line change adds RUN_SERIAL TRUE only for this test on Windows. |
| Test registration | Passed; the existing guest_timed_wait_cpu test remains registered. |
| Test-quality heuristic | No findings from the workspace copy. The isolated precheck checkout lacked this workspace-only helper. |
| Current-main merge preview | Clean against e2df06e661f94d6e63b8f6622c8c58507b0245c1. |
| Hosted Windows job | Job passed, but its changed-guest-test step said no guest core/libs test sources changed, so the log does not verify this test on the reviewed head. |
| Other hosted jobs | Conventions, intake, labels, library-portability, report and eligibility passed. Linux and specialized jobs were skipped. |
Selected unedited output from checks
All conventions checks passed.
179 test script(s), each run by an add_test or a workflow
{
"findings": [],
"negative_control_candidates": [],
"limits": [
"Heuristics can miss weak assertions and can flag valid tests; inspect every finding.",
"A test that passes against base is not by itself proof that the PR test is inadequate.",
"Negative controls are only candidates until the test actually runs against base and fails by assertion rather than import/setup error."
]
}windows pass 38m36s https://github.com/boykopovar/AnyPS5/actions/runs/41156230070/job/124404529783
linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41156230070/job/124404530833
windows Build and run changed guest core/libs tests 2026-10-31T02:20:55.4114386Z No guest core/libs test sources changed
windows Build and run changed guest core/libs tests 2026-10-31T02:20:55.4114980Z No guest core/libs test sources changed; the libs build still ran
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13710-a0e3da6c4937/head-a0e3da6c4937-b075150c/tools/pr_test_quality.py': [Errno 2] No such file or directory
Findings
Blocking
None found in the CMake diff.
Non-blocking
The PR describes a Windows ctest --show-only check and focused test run, but it does not identify the tested PR head. The hosted Windows job for head a0e3da6c493749db7a5ad4e96371dec59979a315 did not run the changed guest test. I am leaving this as a comment rather than requesting code changes because the scheduling property itself matches the existing CMake pattern.
Sources
- CMake change at the reviewed head
- Windows test selection and CTest invocation at current main
- Existing serial Windows libkernel tests at current main
Not verified
I did not run CTest locally or independently verify that RUN_SERIAL appears in the test properties for the exact reviewed head. The PR author reports such a check and focused Windows run, but the reported base is 7fcab08f71 rather than the reviewed-head SHA.
To get this to a good state
Please provide the exact commit SHA used for the reported Windows ctest --show-only and focused test run, or rerun those checks on a0e3da6c493749db7a5ad4e96371dec59979a315. I will recheck the same evidence before approving.
|
Checked the diff against the description: |
…wait latency Run 41245658018 (b9bf246). linux: agc_shader_disk_cache_large_file skips when the runner has under 3 GiB free and check_skips.py did not list that reason. windows: guest_timed_wait_cpu aborted on a runner scheduling hiccup (latency bound exceeded, #13710 made it serial but it is still timing-based). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
What
guest_timed_wait_cpuaborts on the Windows CI runner. The latest case is job 124274871982, a push build ofmain37277ea (#13366, unrelated) at 2026-10-30 19:35Z. The test aborts right afterscePthreadCondTimedwait(500 us): calling-thread CPU 0.0% (limit <= 40%), before the line for that wait's latency bounds.Cause. The test from #11725 times 1000
sceKernelUsleep(100), 500sceKernelUsleep(500)and 500scePthreadCondTimedwait(500 us)calls on Windows. It requires each set's 99th percentile under 3 ms and its longest wait under 10 ms. CI runs ctest with--parallel 4on a 4-vCPU runner, and the tests ctest starts beside it (guest_usb_storage,guest_nanosleep_long_requestand theguest_raise_*tests, as in that job) keep the CPUs busy. A woken waiter then waits a scheduler quantum or more before it runs again. A copy of the test that prints the samples before checking them shows this in the failing runs:scePthreadCondTimedwait(500 us): 99th percentile 2.60 ms, longest wait 13.25 ms. This run stops at the same line as the CI job.sceKernelUsleep(500 us): 99th percentile 3.57 ms, longest wait 23.3 ms.It isn't CPU-bound load that causes this. With 16 busy loops on the same 4 CPUs the test passed 10 of 10 times, because a thread whose wait completes is boosted past them. With the test alone, the 99th percentiles overshoot by 0.5 to 1 ms.
Change.
guest_timed_wait_cpuruns withRUN_SERIALon Windows, so ctest doesn't run other tests beside it. This is the third option in the comment on #11725 asking for the test to be made robust on CI. #4356 did the same forguest_pthread_startandaudio_out2_timing. The bounds are unchanged; #13338 kept the Windows ones deliberately. The test takes 1.2 to 1.4 s, so running it alone costs CI about a second. Processes outside ctest can still load the runner.Measurements. Each pass runs the 92 libkernel timing and thread tests around it with ctest pinned to the given logical CPUs (every test inherits the mask):
mainmainarm then change armmainand the change pass by passmainarm then change armTwo more measurements:
guest_sleep_wake, once, in the 2-CPU change arm.The two failures with the change happened while the test ran alone. Other builds were using about 80% of this machine's CPU at the time.
CI. Windows:
guest_timed_wait_cpufailed in 1 of 54 test jobs since #11725 merged. Linux: it failed in 7 of 19 jobs between #11725 and #13338, and in 0 of 41 since #13338 loosened the Linux bounds.Tested
Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON,main7fcab08.cmake --build buildandcmake --build build --target libs: both succeed.ctest --show-only=json-v1 -R '^guest_timed_wait_cpu$'listsRUN_SERIAL: truebeside the existingENVIRONMENT_MODIFICATIONand the 30 sTIMEOUT.ctest -R "^guest_timed_wait_cpu$|patched_libraries": 2/2 passed.patched_libraries:389 patched libraries loaded, 0 failed.python tools/check_conventions.py --base origin/main: passed.python tools/check_test_registration.py build:1617 test executable(s), 0 built and not run as recorded, none new.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)