tests: compare run_preset mount line with the resolved package path #3508
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3508"
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 Leyukaka on 2026-11-29T19:01:43Z.
Refs #3507 (item b).
What
tools/startup/run_preset.py:264resolves the package path before printing the mount command at:286.tests/startup_run_preset_check.pyexpected the unresolved spelling, so it reportedFAIL: --print outputwhen the temp directory contained an 8.3 component that the launcher expanded.package.resolve().--packagethroughbin/.., so the input spelling differs from the resolved one even without an 8.3 temp directory.mount: subst G: <resolved package>is compared, so an unresolvedbin/..suffix is rejected.Test file only (+7/-4), no launcher change.
Test
Base
d3e306a7, head364c3075.python -B tests/startup_run_preset_check.py:OK: 12 preset choices, staging and controls, exit 0..resolve()dropped atrun_preset.py:264, the check printsFAIL: --print output, exit 1. Restored: exit 0.Not covered
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-29T21:50:48Z.
Review: APPROVED
Reviewed at head
364c30750d9005fdb6b220b7bdbfba9e240b3555(parentd3e306a7). It merges cleanly into currentmain(ff9dcef0).Summary
run_preset.py:264resolves--package, and--printwrites that resolved path in themount: substline at:286. Before this PR the check expected the unresolved temporary-directory spelling, so it failed withFAIL: --print outputwhenever the temp path resolves to something else (8.3 short names on the runner, issue #3507 (b)). This PR:package/bin/..to--package, so the input differs from its resolved form on every host;package.resolve();bin/..suffix can't pass as a substring.check()collects failures (tests/startup_run_preset_check.py:25-30), and the mount line is the only launcher-path comparison in the file. The laterrun4and missing-Executable calls compare no paths. So this covers all of item (b).No downloads, network calls, build-command, CI or agent-config changes. One test file only.
Findings
Note for the maintainer: #3512 fixes the same failure in the same file by resolving the temp directory up front. The two merge cleanly and are compatible, but only one is needed. This PR keeps a check that fails on any host if the launcher stops resolving the path (see the mutation below); with #3512 alone it would pass. Which to land is your call.
What the test proves
startup_run_preset:--printnames the resolved package root in thesubstmount line, for an input path that differs from its resolved form.Sandbox run
Windows Sandbox with networking disabled (confirmed unreachable inside). The PR tree was exported at the head SHA and mapped read-only, then copied to a scratch folder inside the sandbox. This is a pure-Python test, so I configured but didn't build any targets; nothing it runs is a build output.
8.3 short names are disabled in the sandbox, so I used a directory junction as
TEMP/TMP.Path.resolve()rewrites it to the target, which gives the same mismatch the runner has.OK: 12 preset choices, staging and controls)d3e306a7)FAIL: --print output,1 failure(s)(reproduces the bug)FAIL: --print output,1 failure(s), exit 1Mutation, applied to a scratch copy only:
tools/startup/run_preset.py:264Path(a.package).resolve()->Path(a.package). The PR's check fails with exactly one failure (--print output) and no traceback. The base check passes under the same mutation on a long temp path. So the PR adds a catch that wasn't there, and it fixes the junction/short-path case.Evidence fields
364c30750d9005fdb6b220b7bdbfba9e240b3555startup_run_preset(default and junction TEMP). Failed: none at head. Skipped (77): none.CI
Run 46298533805 at head: the Linux Python job ran
tests/startup_run_preset_check.pyand it passed. The Windows PR job (ctest --preset pr, 82 tests) does not includestartup_run_preset, so Windows CI did not run this test. The/O2job was skipped for the PR run.