test(relinker): split TLS coverage into bounded CTest groups #1913
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1913"
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 gunerky on 2026-10-08T23:28:41Z.
What
Split
tls_function_coverageinto 30 independently registered CTest groups. The displacement cases run per destination register and the ALU encoding cases per operation; smaller metadata, padding, execution and rejection groups remain together. Each group uses an isolated temporary directory and a 30-second CTest timeout. Usectest -L tls_function_coverageto run the whole family. Calling the Python script with only the relinker path still runs all cases; an invalid group fails.Preserve all 451 existing fixture conversions, 256 generated executable runs and existing assertions. This changes test scheduling and registration; runtime behavior is unchanged.
Grouping bounds each entry's workload but does not establish or fix the underlying cause. The unexplained CI delay and independently reproduced Windows diagnostic write failure are documented in this PR description; a shared cause has not been established.
The contribution guidelines ask for slow tests to be split. In the inspected earlier Windows CI job for #1358, this test passed once in 14.71 s and timed out on its next repeat at 120.03 s; the HMD tests passed. This patch bounds work per CTest entry. It has not yet been validated on that hosted-runner workload and does not identify the precise cause of the intermittent delay.
Related: #1358, which reported the Windows CI timeout in the existing TLS test. This scheduling change is independent of its HMD registration change.
Tested
Windows x64, WinLibs MinGW-w64 GCC 15.2.0 UCRT/POSIX/SEH, Python 3.10.6; Release,
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ON, based on upstream main6cc0503dacc9d9697d23001d4103780ad2e9acba.--parallel 4 --timeout 30: 65/65 passed, zero skipped; longest TLS group 3.46 seconds. On the earlier basef145139676a48306681d3a4d5fabf83938759daf, the full suite also passed 65/65, and a separate TLS-only--repeat until-fail:3 --parallel 4run passed all 30 groups three times (90/90 runs). These are local measurements; hosted CI timing has not been established.ae91d978passed all 90 TLS runs but failedwindows_dependency_diagnosticswithCannot write diagnostic fixtureafter one successful repeat. Its source and registration are unchanged. On unmodified maindb1391dc, all 36 relinker tests passed three repeats; a focused diagnostic-only control then reproduced the same write failure on run 17, and the candidate's focused control reproduced it on run 15. No TLS tests were running in those focused controls. The failure exists without this patch; its underlying Windows I/O cause remains unresolved.ae91d978matched fixture names and SHA-256s, conversion contracts and return codes, executable return codes, and 1,713 assertion evaluations. All 16 original assertion ASTs were preserved; no case was omitted or duplicated by the registered groups.displacement_r4was rejected with exit code 2.check_test_registration.py: seven test executables, all registered. Official conventions rules andgit diff --checkpassed.9fa937f193dc5dcb4fc42f8bf0d42a14d194cb1b. Conventions (including this description), test registration and whitespace checks passed; CTest was not rerun for this documentation-only removal. Earlier test results above are retained with their original scope.Checklist
mainat the recorded revision; no matching open test-splitting PR found in the recorded searches.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-09T00:47:21Z.
Review: APPROVED
This is a legitimate test-scheduling change and I can approve it.
tls_function_coverageinto 30 independently registered CTest groups directly addresses the intermittent 120 s CI timeout you cite (#1358), and a 30 sTIMEOUTper group + isolated temp dir per group means one slow case can't drag the whole suite over the bar. That's the right shape of the fix for a scheduling problem.ctest -L tls_function_coveragestill runs the whole family. Good.Non-blocking notes:
windows_dependency_diagnosticswrite-failure control suggests something in that direction), the split hides the symptom rather than fixing it. Worth a line in the debt entry saying the timeout is masked, not root-caused, so the next person investigating the I/O failure knows the test split is not a fix.--repeat until-fail:3evidence is local, and you explicitly say hosted CI timing isn't established. That's fine for approving the scheduling change, but I'd want one green hosted run before this is considered "done" for the CI-flake it targets.Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:14:50Z.
Please drop the
docs/dev/TechnicalDebt.mdentry. TechnicalDebt lists shortcuts in the code; the unexplained CI delay and thewindows_dependency_diagnosticswrite failure belong in the PR description, which already has them.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T05:17:12Z.
This now conflicts with main in
test_tls_function_coverage.py(#2238 added cases there); please rebase.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T08:08:51Z.
Rebased onto current
mainas @oneandonlydean asked; the only conflict wastest_tls_function_coverage.pyafter #2238:address-taken-tls-callbackgoes into themetadatagroup.register_alu_casesloop goes intoregister_address_loads.short-alu-before-returngoes intorejected, andregister-address-aluis dropped there as onmain.Relinker build + ctest after the rebase: 86/86 pass. The TechnicalDebt entry is already gone from the head. Merging once CI is green.