test: name the shim target when the layout check cannot load it #1858
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1865"
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 R0Y00/Xbox2Windows. Originally posted by ChazY11 on 2026-11-24T19:46:24Z.
Why
startup_xg_bc7_layoutloads the shim by path. In a test directory configured beforestartup_stub_xg_xswas built thefile is missing, and ctypes reports only:
"There is no such file, build the target that makes it" is the useful half of that, and it is missing — the same shape of
dead end as the stale-probe message I hit in
startup_debug(fixed in #1863).Change
SystemExitkeeps the exit status non-zero, so ctest still reports a failure rather than a skip.Tested
The passing run is the one ctest makes, because the fixture needs
X2W_XG_BC7_4K_S_LAYOUT=1and the build directory asits working directory — invoking it by hand from the repository root traps inside the shim on a missing sibling DLL. That is
an artefact of my manual invocation, not of this change; the ctest result above is the one to trust.
Scope
One test file, the load call only.
Notes
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T19:49:41Z.
Review: COMMENTED
Reviewed head
b1ab8a678c824b3c7e542eb948445e244348c2f8in a clean Linux worktree.git diff --check origin/main...HEAD: clean (rc 0)python -B tests/docs_links_check.py: rc 0python -B tests/bidi_controls_check.py: rc 0ast.parse) of the touched test: rc 0Findings: 0 P1, 0 P2.
The change turns a failed
ctypes.WinDLLload into aSystemExitthat names the target to build. No assertion on the shim's behavior is added or tightened. The test is Windows-only (ctypes.WinDLLandWINFUNCTYPE). On Linux it stops with anAttributeErrorbefore the new branch, so I could not exercise the new path. A mutation would only change message text, so I did not run one.Nit: the PR title says "when the check fails" while the diff handles only the load failure.
Thanks for the contribution. As a diagnostic-only change it adds no new behavior check, so I am not recommending a merge for the quality filter.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T20:28:55Z.
Review: COMMENTED
Review of head
b1ab8a678cCommands run locally (all rc=0):
git diff --check origin/main...HEAD,python3 tests/docs_links_check.py,python3 tests/bidi_controls_check.py,python3 -m py_compileon the touched test file.The script needs ctypes.WinDLL, so the changed path cannot run on Linux. Win2025 was not run (pure-Python fast path).
Mutation: reverting the try/except only brings back the raw loader error. No test in the repo fails, because the change only improves an error message. It does not protect any tools/ or src/ logic.
Result: no P1 or P2 defects, but the change kills no mutation of real logic (it only improves a failure message), so it does not pass the quality filter for a safe-merge. No receipt written, not merged. A maintainer can still merge it by hand if the message is wanted.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T20:29:39Z.
Review: COMMENTED
Correction: the mutation line in my review above was not run. I only read the diff. The path needs ctypes.WinDLL, so it cannot run on Linux. Verdict unchanged: no merge, since the change only improves an error message.
AI-assisted; commands listed were executed locally.