fix(tools): keep explicit sanitizer failures from being skipped #12483

Merged
StoneDC merged 1 commit from upstream-pr/12483 into main 2026-11-09 21:36:02 +00:00
StoneDC commented 2026-10-28 15:51:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by StoneDC on 2026-10-28T15:51:52Z.


What

A JUnit testcase containing both an explicit failure/error and a skip marker can currently be summarized as skipped, allowing a failing run to succeed. Give failure/error precedence while retaining legitimate CTest skip and known-failure handling. The basis is the existing XML outcome and CLI exit-code contract, reproduced with contradictory real JUnit input.

Known limits: This validates report classification; it is not a sanitizer run of the full product.

Independent change based on main f3eb573e6fc3. Actual three-way merge of this exact head into the pre-publication main f8f5b24b77ad is clean. Related #12096 (write errors), #12226 (duplicate testcases), #12349 and #12437 (input/output aliases/write errors) implement different behavior. Selected production/test compositions passed on both hosts; no merge ordering dependency is required. Shared-file comparisons are scoped compatibility checks, not whole external-PR builds.

Tested

Windows 11 (MinGW GCC 15.2, Python 3.14.3, Node 24) and Ubuntu 26.04/WSL (GCC 15.2, Python 3.14.4, Node 22): windows: 1 focused CTest groups, 0 failures, 0 skipped; linux: 1 focused CTest groups, 0 failures, 0 skipped.

The complete affected focused suites and CMake/script registration checks passed on both hosts. The new regression fails against the unchanged production implementation from main f3eb573e6fc3 on both hosts.

Commands (configure a Release Ninja build with -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON; native targets are built where affected):

ctest --test-dir build -R '^sanitizer_report$' --parallel 8 -V
python3 tools/check_test_registration.py --scripts

Additional integration check: all 19 independent changes combined with main 17f8dfad513b at bbba7fc479a7 passed the affected Windows/WSL suites, native relinker build, registration and environment audit. The later observed main changes only an unrelated guest test; each exact PR head also merges cleanly into it. This combined check establishes composition, not a dependency between these PRs.

No GPU, PS5 hardware, actual game, macOS runtime or full system-library build is claimed. Hosted CI has not run for this new PR yet. AI assistance was used; the evidence and limitations above were checked locally.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5053467267 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12483). Originally posted by [StoneDC](https://github.com/StoneDC) on 2026-10-28T15:51:52Z. --- ### What A JUnit testcase containing both an explicit failure/error and a skip marker can currently be summarized as skipped, allowing a failing run to succeed. Give failure/error precedence while retaining legitimate CTest skip and known-failure handling. The basis is the existing XML outcome and CLI exit-code contract, reproduced with contradictory real JUnit input. Known limits: This validates report classification; it is not a sanitizer run of the full product. Independent change based on main `f3eb573e6fc3`. Actual three-way merge of this exact head into the pre-publication main `f8f5b24b77ad` is clean. Related #12096 (write errors), #12226 (duplicate testcases), #12349 and #12437 (input/output aliases/write errors) implement different behavior. Selected production/test compositions passed on both hosts; no merge ordering dependency is required. Shared-file comparisons are scoped compatibility checks, not whole external-PR builds. ### Tested Windows 11 (MinGW GCC 15.2, Python 3.14.3, Node 24) and Ubuntu 26.04/WSL (GCC 15.2, Python 3.14.4, Node 22): windows: 1 focused CTest groups, 0 failures, 0 skipped; linux: 1 focused CTest groups, 0 failures, 0 skipped. The complete affected focused suites and CMake/script registration checks passed on both hosts. The new regression fails against the unchanged production implementation from main `f3eb573e6fc3` on both hosts. Commands (configure a Release Ninja build with `-DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON`; native targets are built where affected): ```sh ctest --test-dir build -R '^sanitizer_report$' --parallel 8 -V python3 tools/check_test_registration.py --scripts ``` Additional integration check: all 19 independent changes combined with main `17f8dfad513b` at `bbba7fc479a7` passed the affected Windows/WSL suites, native relinker build, registration and environment audit. The later observed main changes only an unrelated guest test; each exact PR head also merges cleanly into it. This combined check establishes composition, not a dependency between these PRs. No GPU, PS5 hardware, actual game, macOS runtime or full system-library build is claimed. Hosted CI has not run for this new PR yet. AI assistance was used; the evidence and limitations above were checked locally. <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes
MarcZX10 commented 2026-10-28 16:04:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T16:04:12Z.

Review: COMMENTED


I reviewed head 53afb7481500 and ran the focused sanitizer report test from a clean detached worktree on Linux/Python 3.11: relinker-only CMake configure succeeded and ctest -R ^sanitizer_report$ passed (1/1). tools/check_conventions.py --base upstream/main and tools/check_test_registration.py --scripts also passed. Explicit <failure> and <error> elements now take precedence over skip/status metadata, while known-failure accounting remains downstream; the regression checks both CLI exit behavior and the documented known-failure result across contradictory status combinations. Hosted Ubuntu/Windows relinker, ASan, conventions, eligibility, intake and labels passed; macOS relinker jobs are pending and full Linux/Windows product tests were skipped by policy. I found no blocking issue in the report-classification change.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5685779894 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12483#pullrequestreview-5685779894). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T16:04:12Z. **Review:** COMMENTED --- I reviewed head `53afb7481500` and ran the focused sanitizer report test from a clean detached worktree on Linux/Python 3.11: relinker-only CMake configure succeeded and `ctest -R ^sanitizer_report$` passed (1/1). `tools/check_conventions.py --base upstream/main` and `tools/check_test_registration.py --scripts` also passed. Explicit `<failure>` and `<error>` elements now take precedence over skip/status metadata, while known-failure accounting remains downstream; the regression checks both CLI exit behavior and the documented known-failure result across contradictory status combinations. Hosted Ubuntu/Windows relinker, ASan, conventions, eligibility, intake and labels passed; macOS relinker jobs are pending and full Linux/Windows product tests were skipped by policy. I found no blocking issue in the report-classification change.
rooklz commented 2026-10-28 17:59:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-28T17:59:12Z.

Review: APPROVED


Reviewed head 53afb74815 on macOS 26 (arm64). This is the first macOS run.

Tests. tools/tests/test_sanitizer_report.py passes on Python 3.9.6 and 3.13.13. On 3.14 it fails the same way on main, because the Homebrew pyexpat in this environment is broken. With main's tools/sanitizer_report.py swapped in, the new test fails 16 of its 24 subtests. The 8 that still pass have no skip marker and a non-disabled status, and main already reports those as failed. So the red set is exactly the contradiction cases.

Real CTest oracle (CMake/CTest 4.3.1, --output-junit). I ran 12 tests: pass, fail, SKIP_RETURN_CODE, SKIP_REGULAR_EXPRESSION, DISABLED, missing executable, WILL_FAIL, TIMEOUT, FAIL_REGULAR_EXPRESSION, an ASan line, and FIXTURES_REQUIRED with a failed setup. CTest never wrote <failure> and <skipped> in the same testcase. The results() dicts from main and head are identical on this report, and both exit 1. So real CTest output is unaffected, and the change only decides the contradictory or hand-made input it targets.

Mutants. 7 of 8 are killed:

  • check <failure> only, or <error> only: 10 failures each
  • explicit failure only counts when there is no <skipped>: 14
  • disabled beats an explicit failure: 6
  • a CTest skip reason beats an explicit failure: 8
  • drop the status in FAILED_STATUSES branch: 2
  • notrun no longer counts as failed: 2

The survivor uses .//failure and .//error descendant search. It is equivalent for JUnit's flat testcase children.

Gates. check_conventions --base upstream/main is clean. check_test_registration --scripts reports 212. merge-tree against main e4da19aff0 is clean. Pairwise merges with #12226, #12349 and #12437 are clean.

Merge order. There is a textual conflict with #12493 in tools/tests/test_sanitizer_report.py. Both PRs add a test method at the same spot after test_failed_tests_without_reports_keep_the_single_column_table. The fix is to keep both methods. With that resolution the combined file passes on 3.9.6 and 3.13.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5687343873 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12483#pullrequestreview-5687343873). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-28T17:59:12Z. **Review:** APPROVED --- Reviewed head `53afb74815` on macOS 26 (arm64). This is the first macOS run. **Tests.** `tools/tests/test_sanitizer_report.py` passes on Python 3.9.6 and 3.13.13. On 3.14 it fails the same way on main, because the Homebrew pyexpat in this environment is broken. With main's `tools/sanitizer_report.py` swapped in, the new test fails 16 of its 24 subtests. The 8 that still pass have no skip marker and a non-`disabled` status, and main already reports those as failed. So the red set is exactly the contradiction cases. **Real CTest oracle (CMake/CTest 4.3.1, `--output-junit`).** I ran 12 tests: pass, fail, SKIP_RETURN_CODE, SKIP_REGULAR_EXPRESSION, DISABLED, missing executable, WILL_FAIL, TIMEOUT, FAIL_REGULAR_EXPRESSION, an ASan line, and FIXTURES_REQUIRED with a failed setup. CTest never wrote `<failure>` and `<skipped>` in the same testcase. The `results()` dicts from main and head are identical on this report, and both exit 1. So real CTest output is unaffected, and the change only decides the contradictory or hand-made input it targets. **Mutants.** 7 of 8 are killed: - check `<failure>` only, or `<error>` only: 10 failures each - explicit failure only counts when there is no `<skipped>`: 14 - `disabled` beats an explicit failure: 6 - a CTest skip reason beats an explicit failure: 8 - drop the `status in FAILED_STATUSES` branch: 2 - `notrun` no longer counts as failed: 2 The survivor uses `.//failure` and `.//error` descendant search. It is equivalent for JUnit's flat testcase children. **Gates.** `check_conventions --base upstream/main` is clean. `check_test_registration --scripts` reports 212. `merge-tree` against main `e4da19aff0` is clean. Pairwise merges with #12226, #12349 and #12437 are clean. **Merge order.** There is a textual conflict with #12493 in `tools/tests/test_sanitizer_report.py`. Both PRs add a test method at the same spot after `test_failed_tests_without_reports_keep_the_single_column_table`. The fix is to keep both methods. With that resolution the combined file passes on 3.9.6 and 3.13.
THEMANnt commented 2026-10-29 06:30:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T06:30:28Z.

Review: APPROVED


Reviewed 53afb7481500f00bc9918fdb45bb2577708e4f06 against f3eb573e6fc3bd38261690d850c21b45b88f705b. Explicit JUnit failure/error elements now take precedence over skip status and skip markers. Ordinary CTest skip handling is preserved when no failure is present. No actionable finding in this scoped review.

Windows/Python 3.11 validation: head 22 passed, 0 skipped; baseline 21 passed, 0 skipped. New contradictory-status fixtures fail with old production and pass on the head. Coverage includes failure/error elements with skipped or not-run metadata; no sanitizer workload itself was executed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5693730535 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12483#pullrequestreview-5693730535). Originally posted by [THEMANnt](https://github.com/THEMANnt) on 2026-10-29T06:30:28Z. **Review:** APPROVED --- Reviewed `53afb7481500f00bc9918fdb45bb2577708e4f06` against `f3eb573e6fc3bd38261690d850c21b45b88f705b`. Explicit JUnit failure/error elements now take precedence over skip status and skip markers. Ordinary CTest skip handling is preserved when no failure is present. No actionable finding in this scoped review. Windows/Python 3.11 validation: head 22 passed, 0 skipped; baseline 21 passed, 0 skipped. New contradictory-status fixtures fail with old production and pass on the head. Coverage includes failure/error elements with skipped or not-run metadata; no sanitizer workload itself was executed.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!12483
No description provided.