tests: cover ffx_provider_loop generation and refusal paths #3741
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!3741
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3739"
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?
@Ammmae0x on GitHub · 2026-12-01 13:29 UTC · original
Ammmae0x:tests/ffx-provider-loop→main· +1127 −0 · 5 files · 1 commits · merged 2026-12-01 17:06 UTCRefs #1149
Adds comprehensive synthetic AMD64 PE32+ unit, boundary, CLI/refusal, and 1:1 mutation tests for
tools/ffx_provider_loop.py(previously 0 Python unit tests), with zero edits to existing files (5 new files only).tests/ffx_provider_loop_check.pybuilds a minimal synthetic PE32+ image in memory (no external binaries or DLLs): NOP-filled code regions with the exact instructionsgenerate_loop()reads (LEA rip-relative globals, helper immediate, RET leaf, CALL/JMP substitutions,ffxCreateContextexport slices) and a.rdatasection with the three uint32 tables, two UTF-16 resource names, export directory,.pdatarecords, and the heap GUID the device-init CLI needs. It covers the deterministic C++ output structure (exactloop_data_486f0/48838/b79d0arrays,wchar_tnames,scratch_size,helper_size,build/reserve_resource/schedule_upload/run_loop/create_loop_contextlowering and jump/call substitutions), boundary values (helper0/0xffffffff,0xffffffff/0table values, namesA1_2/123/a), and refusals pinned by exact exception type and message (invalid/non-ASCII/empty resource names, non-PE and truncated images, invalid instructions, RET-less leaf, out-of-range RVAs, slices outside the owned export function, renamed export), plus the device-init CLI positive path and SHA/missing/non-PE/suffix refusals (exit 1, no traceback, no output file).tests/cmake/ffx_provider_loop.cmakeregisters the check plus 5WILL_FAIL TRUE--mutatecontrols;tests/ffx_provider_loop_meta_check.pyruns every case individually and together and executes the exact 1:1 set of 5 mutations against real copies of the source.Linux verification (this head,
/tmp/pe-env/bin/python):tests/ffx_provider_loop_check.py:ffx_provider_loop: 135 cases PASStests/ffx_provider_loop_meta_check.py:ffx_provider_loop: 135 cases, 5/5 mutations killed PASStests/form_coverage_check.py: passedtests/docs_links_check.py: passed (208 files, 802 links)tests/bidi_controls_check.py: passed (2826 files, no bidirectional controls)git diff --checkclean;git statusshows only the 5 new files, zero personal pathsNo mingw on this host, so no Windows compile check; WIN-VERIFY run is the arbiter.
AI-assisted.
Windows Verification (
c8f766c7)git merge-tree --write-tree upstream/main HEAD->242c5aac(exit 0),git diff --checkcleanpy_compile,ffx_provider_loop_check.py,ffx_provider_loop_meta_check.py,form_coverage_check.py,docs_links_check.py(209 files, 809 links),bidi_controls_check.py(2829 files) passedffx_provider_loop:135 cases, 5/5 mutations killed PASS;dev8/8 passed (5.85s, includes existingffx_provider_loop_hardware/warpand 6 new tests);release8/8 passed (5.67s). AI-assisted.