tests: compare resolved temp paths in the LDS request CLI check #3424

Merged
Leyukaka merged 1 commit from upstream-pr/3424 into main 2026-11-29 08:29:38 +00:00
Leyukaka commented 2026-11-29 00:50:20 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T00:50:20Z.


Change

shader_compile_lds_request_cli_check fails on main's Windows checks in every completed run since 7e5c378d (runs 46137868923, 46174243424, 46194210510, 46194701708). The first error is in test_missing_companion_and_hostile_path_refusals:

Paths shortened:

File "...\tests\startup_compile_lds_request_cli_check.py", line 346, in test_missing_companion_and_hostile_path_refusals
AssertionError: WindowsPath('.../runneradmin/.../Temp/tmp.../some_dir') != WindowsPath('.../RUNNER~1/.../Temp/tmp.../some_dir')

dest_link.resolve() expands the runner's 8.3 temp path, while dir_path is built from the unresolved TemporaryDirectory name. This change resolves the temporary directory once in that test (base = Path(tmp).resolve(), :230), so dir_path (base / "some_dir", :238) is in long form:

  • :346 dest_link.resolve().parent == dir_path: both sides are long form.
  • :349 list(link_out.iterdir()) == [dest_link]: both sides are built from base, so this one is unaffected.
  • :355 Path(out_ca) == dest_link.resolve(): out_ca is dir_path / name (the tool prints args.output / name without resolving), so it is long form too. On CI this assertion would have failed next, after :346.

No assertion is changed or removed. The other tests in the file do not compare resolved paths.

Verification

Base main 212d4b5f, release preset.

  • ctest --test-dir out\build\release --no-tests=error --output-on-failure -R "^shader_compile_lds_request_cli_check$": passed. With TMP/TEMP/TMPDIR set to an 8.3 short path, it passed with the fix and also with main's file.
  • The symlink branch that holds :346, :349 and :355 is skipped on my host: symlink_to raises winerror 1314 (no symlink privilege), and the test skips that branch on that error. The failing assertion was therefore not exercised locally. A mutation at :346 also passes locally for the same reason. The fix rests on the reasoning above.
  • The pr test preset (CMakePresets.json, "Windows pull request smoke tests") does not include shader_compile_lds_request_cli_check, so this PR's own checks do not run it. Per CONTRIBUTING.md: "To check a branch in both configurations before merge, select it under Actions → Windows checks → Run workflow." Please run the full Windows checks on this branch.

Evidence and follow-up

Not covered: runs 46174243424, 46194210510 and 46194701708 also have other failing tests; this change does not address them.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (no capability or build change)
  • No application files, dumps, distribution links or secrets included.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5546183629 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3424). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T00:50:20Z. --- ## Change `shader_compile_lds_request_cli_check` fails on `main`'s Windows checks in every completed run since `7e5c378d` (runs 46137868923, 46174243424, 46194210510, 46194701708). The first error is in `test_missing_companion_and_hostile_path_refusals`: Paths shortened: ``` File "...\tests\startup_compile_lds_request_cli_check.py", line 346, in test_missing_companion_and_hostile_path_refusals AssertionError: WindowsPath('.../runneradmin/.../Temp/tmp.../some_dir') != WindowsPath('.../RUNNER~1/.../Temp/tmp.../some_dir') ``` `dest_link.resolve()` expands the runner's 8.3 temp path, while `dir_path` is built from the unresolved `TemporaryDirectory` name. This change resolves the temporary directory once in that test (`base = Path(tmp).resolve()`, :230), so `dir_path` (`base / "some_dir"`, :238) is in long form: - :346 `dest_link.resolve().parent == dir_path`: both sides are long form. - :349 `list(link_out.iterdir()) == [dest_link]`: both sides are built from `base`, so this one is unaffected. - :355 `Path(out_ca) == dest_link.resolve()`: `out_ca` is `dir_path / name` (the tool prints `args.output / name` without resolving), so it is long form too. On CI this assertion would have failed next, after :346. No assertion is changed or removed. The other tests in the file do not compare resolved paths. ## Verification Base `main` `212d4b5f`, release preset. - `ctest --test-dir out\build\release --no-tests=error --output-on-failure -R "^shader_compile_lds_request_cli_check$"`: passed. With TMP/TEMP/TMPDIR set to an 8.3 short path, it passed with the fix and also with `main`'s file. - The symlink branch that holds :346, :349 and :355 is skipped on my host: `symlink_to` raises winerror 1314 (no symlink privilege), and the test skips that branch on that error. The failing assertion was therefore not exercised locally. A mutation at :346 also passes locally for the same reason. The fix rests on the reasoning above. - The `pr` test preset (`CMakePresets.json`, "Windows pull request smoke tests") does not include `shader_compile_lds_request_cli_check`, so this PR's own checks do not run it. Per CONTRIBUTING.md: "To check a branch in both configurations before merge, select it under **Actions → Windows checks → Run workflow**." Please run the full Windows checks on this branch. ## Evidence and follow-up Not covered: runs 46174243424, 46194210510 and 46194701708 also have other failing tests; this change does not address them. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [ ] I updated README/docs when a capability or build requirement changed. (no capability or build change) - [x] No application files, dumps, distribution links or secrets included.
tedin7 commented 2026-11-29 08:29:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-29T08:29:35Z.

Review: COMMENTED


Reviewed 9fde3f70971909a85939262a2c54201891e8aa87:

  • tests/startup_compile_lds_request_cli_check.py: resolves Path(tmp) (Path(tmp).resolve()) in test_missing_companion_and_hostile_path_refusals so temp path comparisons match when temp directories use symlinks or 8.3 short names.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 9fde3f70971909a85939262a2c54201891e8aa87:

  • ctest --preset dev -R '^shader_compile_lds_request_cli_check$' --parallel 3 --no-tests=error --output-on-failure: 1/1 passed (5.92s)

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6102087063 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3424#pullrequestreview-6102087063). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-29T08:29:35Z. **Review:** COMMENTED --- Reviewed `9fde3f70971909a85939262a2c54201891e8aa87`: - `tests/startup_compile_lds_request_cli_check.py`: resolves `Path(tmp)` (`Path(tmp).resolve()`) in `test_missing_companion_and_hostile_path_refusals` so temp path comparisons match when temp directories use symlinks or 8.3 short names. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `9fde3f70971909a85939262a2c54201891e8aa87`: - `ctest --preset dev -R '^shader_compile_lds_request_cli_check$' --parallel 3 --no-tests=error --output-on-failure`: **1/1 passed** (`5.92s`) AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3424
No description provided.