Ignore MASM macros/prefixes and inspect JUnit children in form_coverage #227
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!227
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/227/head"
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?
@alexander-src on GitHub · 2026-11-21 18:48 UTC · original
alexander-src:fix/form-coverage-masm-junit→main· +41 −11 · 2 files · 2 commits · merged 2026-11-21 19:55 UTCChange
Fix MASM mnemonic filtering and JUnit testcase child-element handling in
tools/form_coverage.py:"local"toMASM_DIRECTIVESand track macro names defined via<name> MACROinmasm_mnemonics()soLOCALdeclarations and macro invocations (such asplane_requestintests/cpu/bink_descriptors.asmanddeltaintests/cpu/working_set_delta.asm) are not reported as unmatched x64 mnemonics. On the current repository fixtures,x64_zen2.fixture_forms_not_in_referencedrops from['delta', 'local', 'plane_request']to[].lock,rep,repe,repz,repne,repnz) inmasm_mnemonics()so prefixed instructions (e.g.lock cmpxchg,rep movsb) map to their canonicalx64_zen2.tsvmnemonics.<failure>,<error>, and<skipped>child elements on<testcase>nodes inread_results()so a JUnit case withstatus="run"and a<failure>,<error>, or<skipped>child is not classified as"pass".check_parsing()intests/form_coverage_check.pyto cover all three cases and assertfixture_forms_not_in_reference == []on the repository fixtures.Verification
Run on Linux x86_64 (
python3 3.14) againstmaine8895ad:check_example,check_jump_tables,check_unclassified,check_shader_records, andcheck_parsingintests/form_coverage_check.py: all 5 passed.main:tools/form_coverage.py:check_parsing()failed on<failure>,<error>, and<skipped>testcases (all reported as"pass"), andmeasure({})["x64_zen2"]["fixture_forms_not_in_reference"]returned['delta', 'local', 'plane_request']vs[]with this change.check_denominators()intests/form_coverage_check.pyrequiresiced-x86(not installed in the host Python environment; installed bypython-linuxCI viarequirements-dev.txt), and Windowsbuild-and-testCI (no Windows host).Evidence and follow-up
All new test inputs in
tests/form_coverage_check.pyare synthetic MASM and JUnit XML snippets authored inline under the repository's MIT license. No game files or external dumps were used.Checklist
AI-assisted: yes.
@R0Y00 on GitHub · 2026-11-21 19:12 UTC · original
In
check_parsing, the finalfixture_forms_not_in_reference == []assertion makes every future source fixture with a genuine unmatched mnemonic fail the parser test. Reporting those forms is a supported outcome of the coverage tool. Please scope the assertion to the macro names andlocal, or use the isolated fixture already in this test. Keep the prefix and JUnit child-element controls.@alexander-src on GitHub · 2026-11-21 19:17 UTC · original
Good catch. Updated in
8f7457d:check_parsingnow checksfixture_forms_not_in_reference == []on the isolated synthetic fixture, and only asserts that{"delta", "local", "plane_request"}stay out of the full repo's unmatched forms list. Kept the prefix and JUnit child-element checks intact.