fix(tools): escape sanitizer report test names #12493
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12493"
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 StoneDC on 2026-10-28T15:54:22Z.
What
Render sanitizer test names containing table/Markdown control characters as literal encoded code spans, preserving ordinary names and failure accounting.
Integrate current main after prerequisite #12483 merged. Keep its explicit-failure precedence, summary-input alias protection, symlink-loop error handling and JSON output. No open prerequisite remains; the PR diff changes only the name renderer and its regression tests.
Cover all five summary tables, carriage-return-only names, literal backslashes, Markdown punctuation and ampersands. Add a real CLI regression combining contradictory skipped/failed JUnit entries with special names: JSON keeps the original names, Markdown appends safe literal cells, the source report stays unchanged, and unexpected failures still exit 1.
Tested
Exact tested head:
36bcf0ce9cc2efd9fc6bd47cc58a16d96519476d, including maind0913992db901fcf4cba0bcb7b9a81284080eda6and merged prerequisite #12483 (53afb7481500f00bc9918fdb45bb2577708e4f06).Windows 11 / MinGW GCC 15.2 / CMake 4.3.1 / Python 3.12.14 and 3.14.3; WSL Ubuntu 26.04 / GCC 15.2 / CMake 4.2.3 / Python 3.12.16 and 3.14.4. Separate Ninja Release configurations use
ANYPS5_RELINKER_ONLY=ON,BUILD_TESTING=ONand each selected interpreter. The relinker builds successfully on both platforms.ctest --test-dir BUILD -R '^(sanitizer_report|tools_sanitizer_json|test_script_registration)$' -V --output-on-failure --no-tests=error: all 3 registered groups pass in each of the four configurations. The two Python suites run 33 test methods; longest group is 2.20 seconds.These are focused tool and relinker checks. No full system-library build, local macOS runtime, GitHub-renderer exercise, GPU validation or title run is claimed. Hosted CI for the updated head is reported separately after publication.
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 MarcZX10 on 2026-10-28T15:57:12Z.
Review: COMMENTED
I reviewed head
f05b0d9608e6and ran the focused sanitizer report test from a clean detached worktree on Linux/Python 3.11: relinker-only CMake configure succeeded andctest -R ^sanitizer_report$passed (1/1).tools/check_conventions.py --base upstream/mainandtools/check_test_registration.py --scriptsalso passed. The helper preserves the existing backtick representation for ordinary names and switches special names to HTML code spans with Markdown-significant punctuation encoded; it is used in all five summary tables. The new test exercises failure, known-failure, recovered, and absent-name rows with pipes, backticks, line breaks, backslashes, angle brackets, ampersands, and Unicode. I found no correctness issue in this focused review. Eligibility passed; hosted conventions/intake/labels and the relinker matrix were still pending at my last check, so this comment is not an approval or a claim that hosted CI passed.Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-28T17:55:50Z.
Review: APPROVED
Reviewed head
f05b0d9608on macOS 26.2 (arm64). This was the first macOS run. All findings are from the host; no console was used.test_sanitizer_report: OK on Python 3.9.6 and 3.13. 3.14 errors only because of a local Homebrewpyexpatbreakage, which is environmental. Main'stools/sanitizer_report.pywith the PR test is RED: 20 failures.check_conventions --base upstream/mainclean.merge-treeagainst maine4da19aff0clean. The exact head also merge-trees cleanly with #12437 (the shared-file pair the bot could not compare).check_test_registration --scriptsreports 212.gh api markdown -f mode=gfm) as an oracle on the generated tables. With this head,a|b\|c,x|*em*,only\rcr,p|<qand`t`each render as one<td><code>showing exactly the literal name.Mutants (8): no-pipe-trigger, no-backtick-trigger and no-CR-escape are killed. Two survive, and the renderer shows that both change visible output:
\rfrom the trigger set ("|\n").only\rcrfalls back to backticks, and GFM splits the row into two table rows (``only/cr``). The test nameline\nnext\rreturnalways trips the\n` branch first, so CR-only names are never exercised.*/&unencoded in the<code>span.a|b\|crenders asa|b|c, because\&becomes a Markdown escape, andx|*em*renders as<em>.html.unescaperound-trips these unchanged, so the test can't tell.The test-only diff below kills both (head OK on 3.9.6/3.13; mutant 1 RED 5, mutant 2 RED 15; main RED 25). It pins the documented "everything except alphanumerics and space is encoded":
Not blocking. The production code is correct; this only hardens the test. Nit: the local
import htmlinside the test could live at module level.Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-29T06:45:33Z.
Review: APPROVED
Reviewed
88e0f5154921cf3db0c5ef942f7685f171acd232against3a2b91981651569163768854a1fcdc7193b6667b. Markdown test names containing delimiters or line breaks are emitted as encoded code content across failed, known, recovered and absent-test tables. Ordinary names keep their inline-code rendering. The branch also gives explicit JUnit failure/error elements precedence over skip metadata. No actionable finding in this scoped review.Windows/Python 3.11 validation: head 27 passed, 2 skipped; baseline 25 passed, 2 skipped. The new rendering/contradictory-status assertions fail on old production. Platform symbolic-link cases are skipped. This is report generation from fixture JUnit input, not a sanitizer execution.