Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
StoneDC:fix/b20-sanitizer-failure-precedence
Nov 9, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
StoneDC:fix/b20-sanitizer-failure-precedence

Conversation

@StoneDC

@StoneDC StoneDC commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

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

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@oneandonlydean oneandonlydean self-assigned this Oct 28, 2026

@rooklz rooklz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Windows run of this head (53afb74815), merged onto main 52c09d567d (clean merge, local only). Windows 11 Enterprise 10.0.22621, Python 3.15.1, python -m unittest tools/tests/test_sanitizer_report.py; this machine can create symbolic links.

  • This PR: 28 tests pass, 3 of 3 runs.
  • Negative control: with tools/sanitizer_report.py put back to main's version and this PR's tests kept, the new test test_explicit_failures_override_skipped_and_disabled_statuses fails.

AI-assisted: yes (Claude Code).

@THEMANnt THEMANnt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@StoneDC StoneDC mentioned this pull request Oct 29, 2026
12 tasks done
@oneandonlydean
oneandonlydean merged commit f8a1d50 into boykopovar:main Nov 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants