tests: guest_process_time* fail intermittently under parallel load (sleep returns slightly early on Windows) #3422
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 boykopovar/AnyPS5. Originally posted by Zurisen on 2026-10-11T10:07:09Z.
The check I added in #3366 / #3368 is too strict.
GuestProcessTime.cppsleeps 50 ms and requires the firstsceKernelGetProcessTime/sceKernelGetProcessTimeCounterreading to be at least 50 ms. On Windows, under parallel load, the sleep returns about 0.1-0.15 ms early against the performance counter, so the fourguest_process_time*tests fail intermittently onmain:Measured on
maine272b92e(Windows 11 Home 26200, WinLibs GCC 15.2.0 r7, Release) withctest -R "^guest_process_time" -j8 --repeat until-fail:150, printing the values:counter=49896700 nsagainst 50 ms,first=49852 usagainst 50 ms, andcounter=24934600 nsagainst 25 ms in theAPS5_TIME_SCALE=0.5variant. They pass alone; one failed in a fullctest -j6 --repeat until-fail:3run.Fix branch
Zurisen:fix/process-time-test-margin(one commit onmaina4d5d3ce): require half of the sleep. A start captured on the first call still reads about 0, so the test still catches #3366.-j8 --repeat until-fail:300.Time.cppfrom before #3368: all four still fail.PR intake is limited, so I have not opened a PR; anyone eligible is welcome to carry the commit.