ci: run every test under ASan and UBSan nightly #11062
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11062"
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 MarcZX10 on 2026-10-25T16:19:30Z.
What
Nothing runs the test suite under sanitizers today.
-DANYPS5_ENABLE_ASAN=ONexists, but only people who build it locally see what it finds. This adds a nightly workflow (.github/workflows/sanitizers.yml,cron: '41 3 * * *'plusworkflow_dispatch). It builds every test onubuntu-latestwith ASan and UBSan (-fsanitize=undefined -fno-sanitize=vptr,UBSAN_OPTIONS=halt_on_error=1,ASAN_OPTIONS=detect_leaks=0), runsctest --output-junitand fails only on failures that are not already known.tools/sanitizer_report.pyreads the JUnit file and writes a job summary: failed tests with the first sanitizer report line of each (SUMMARY:,ERROR:/WARNING:orruntime error:), known failures, known failures that now pass and known failures not in the run. Real skips (SKIP_RETURN_CODE,SKIP_REGULAR_EXPRESSION_MATCHED) count as skipped, and any other not-run test (for example "Unable to find executable") counts as failed. An empty report is rejected, so a broken build cannot look green..github/sanitizer-known-failures.txtlists 8 known failures astest sanitizers reason. Each reason names the cause and, where one exists, the open pull request that fixes it (#10973, #11059). A test listed as known that starts passing is reported, so the list can shrink as those merge.agc_driver_guest_memory_lifetime_convertedgetsverify_asan_link_order=0, like the other converted AGC tests.A run of this branch on a fork (plus a push trigger), rebased on
mainafter #9548 and #9133 were merged: 2,286 tests, 1,554 passed, 719 skipped and 13 failed. 12 of those failures were on the list. The 13th wasguest_posix_spawn, a test #9133 added, whose child's deliberateSIGBUSASan intercepts; #11239 fixes it and it is now listed. The four LibAtrac9 shift entries passed after #9548, so they were removed. After #9710 was merged,atrac9_gradientlinks and passes in a targeted ASan and UBSan run of this branch, so its entry was removed too. After #9711, #10829, #10921, #10968 and #11239 were merged,input_magic,guest_sce_v2_exceptions,guest_system_configuration,guest_convert_keycodeandguest_posix_spawnpassed in a targeted ASan and UBSan run of this branch, so their entries were removed as well. The job stays well inside its 330-minute timeout, on free standard runners for this public repository. Notifications for a failing scheduled run go to whoever last changed the cron line. A known entry masks the whole test for the listed sanitizers, so a new problem in a listed test is only seen once its entry is removed.docs/dev/BUILD.mdalso gets a paragraph in #11059 at the same spot; whichever merges second needs a one-line rebase.Tested
tools/tests/test_sanitizer_report.pypasses (summary, known, passing-known, missing-known, not-run, skipped, empty-report and first-report cases, plus a check that the repository's list parses and is sorted). It is registered as thesanitizer_reportctest.ubuntu-latest(Ubuntu GCC 15.2): the first trial exposed the missinglibxrandr-devand green steps after a failed configure, both fixed in this branch. A second trial ran the full suite and led to the list changes in the last three commits; a third trial, on the branch rebased onmainas of then, passed with every failure on the list; a fourth, after #9548 and #9133, gave the results above and the last two list commits.python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/mainpass.tools/pr_overlap.py --branchreports only sharedCMakeLists.txtfiles, plus the BUILD.md overlap with #11059 noted above.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)Imported from boykopovar/AnyPS5. Originally posted by thepoppfish on 2026-10-25T16:44:06Z.
Review: APPROVED
Reviewed exact head
15f7d26023d775dd43fd44f997d38b36175ce6f0against main0119103fa9ed65a894a931da02b6510669991b45. Approve; no blocking findings in the reporting/workflow diff.Independent reporting validation on Windows 11 build 26200, Python 3.14.7 and CMake/CTest 4.3.1:
python tools/tests/test_sanitizer_report.py -v: 21 tests pass, zero skips, 0.529s. Conventions and whitespace checks pass; source checkout remains clean.Unable to find executableandFixture dependency failedremain failures. The known-only subset exits0 only for the matching sanitizer selection. An empty CTest report exits2 without appending a success summary. UTF-8 report/known/summary paths and repeated summary appends also pass. The diagnostic string in this standalone fixture is synthetic; no local sanitizer runtime was involved.sanitizer-tests, from the completed fork trial40189756924, trial heade6910888b741bd7b201da1792dd5ae9dc7e67b32. Replaying its unmodified XML through this PR's reporter gives 2,215 tests:1,490 passed,708 skipped,17 failed. With the current known list and both sanitizers it exits0 with all17 explicitly known; without the known list it exits1. Removing onlyguest_mathfrom a scratch copy of the list also restores exit1 and identifies it as unexpected, leaving16 known. This confirms the positive/negative gating paths on the actual Linux run's data, includingatrac9_gradientas Not Run.The trial's reporter source is identical to this head. Its workflow differs only by the fork-only push trigger and a trailing colon in
ASAN_OPTIONS; I inspected those differences. The completed trial job itself is failed, at its summary step; replaying its artifact with the updated known list is not a claim that the original job passed. JUnit SHA-256:3f9cc21dbef087bcb716f1a65dec91022c8363649c518e1a333bf99c1d77b14c.The known list deliberately masks an entire listed test, as the PR description acknowledges; a different failure within that same test is not independently detected by this scheme. The recovered/missing-known tables help maintain the list but do not remove that limitation.
I reviewed the configuration-success gates, permissions, schedule-only/manual triggers, continued-build/report gating, test registration and the ASan environment append helper. The latter preserves the inherited options while appending
verify_asan_link_order=0. I did not run a new full Linux ASan/UBSan build, Vulkan baseline/change comparison, title or GPU test, or certify the newer in-progress fork trial. This approval uses local reporter/CTest execution and replay of the pinned completed trial above.To replay the real archived input against this head:
Expected exits are1 and0. The full standalone CTest probe is below for the additional status and summary checks.
Standalone CTest / reporter probe
Save as
probe-sanitizer-ctest.pyand run with CMake/Ninja on PATH:It creates only a temporary external project, asserts the exact PR head and leaves the checkout untouched.
AI-assisted review and probe; the stated local commands and archived-data replays were actually run.
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-26T19:21:16Z.
Review: APPROVED
Reviewed
2d04e57a5753c1dbf94aa1369a0465541fcf58b3. Approve; no actionable finding in this focused review.The nightly workflow retains JUnit/log artifacts and routes results through a reporter that distinguishes unexpected failures, known failures, skips, recovered entries and missing tests. Missing/malformed input is an error rather than a clean empty run.
Validation: Windows/Python 3.11: all 21 reporter tests pass, including CTest not-run/skip classification and known-failure handling. Reviewed the workflow, allowlist, registration and existing ASan test option integration.
Scope / next step: The new reporter is absent from the base; its import failure there is an API-addition control only. No full Linux ASan/UBSan nightly run was executed locally.
The final update changes only explanations/references in the known-failure list; reporter, workflow and tests are byte-identical to the initially tested head. I reran all 21 tests, including repository-list parsing, on this updated head.