test(tools): build the select_tests fixture under a junction where Windows refuses symlinks #6961
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6961"
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 boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-16T21:22:17Z.
What
The
select_testsfixture builds its project under a directory symlink, so the paths CMake records differ from the resolved ones (2b056a479). Creating a symlink on Windows needsSeCreateSymbolicLinkPrivilege, which a user without Developer Mode or elevation lacks.setUpClassthen fails with[WinError 1314] A required privilege is not held by the client, andselect_testsfails on every such local run. On that error, the link is now a directory junction (_winapi.CreateJunction), whichos.path.realpathresolves like a symlink. Where a symlink can be created, as on the CI runners, nothing changes.Tested
Windows 11 Pro 26300, no Developer Mode, not elevated. Python 3.15.0, with WinLibs GCC 15.2.0 r7 and Ninja 1.13.2 on
PATH, atmain0dc15620d.main:select_testsfails insetUpClasswith WinError 1314, and no test runs.select_testspasses, andpython tools/tests/test_select_tests.py -vruns and passes all 10 tests.Buildintools/select_tests.pyswitched back toos.path.realpath(the code before2b056a479), 6 of the 10 fail through the junction.symlink_tosucceeds and the code path is the same as before.python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch fix/select-tests-junctionreports no overlap.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by cadenasynyster on 2026-10-17T00:56:03Z.
Confirmed on a second Windows machine, with a different Python version:
Windows 11 10.0.26200.9711, no Developer Mode, not elevated (checked: os.symlink raises OSError). Python 3.14.7, WinLibs GCC 15.2.0 r7.
f3263dfbf: select_tests fails in setUpClass with WinError 1314.c56dbc616): ctest -R select_tests passes, and python tools/tests/test_select_tests.py -v runs and passes all 10 tests.So _winapi.CreateJunction behaves the same on 3.14 as on the 3.15 you tested.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by keravyn-ops on 2026-10-17T10:40:33Z.
Windows run on a host where symlinks are refused: Windows 11 Home 10.0.26100, Developer Mode off (
AllowDevelopmentWithoutDevLicenseunset), non-elevated shell, Python 3.14.select_tests, 2 runsmain673f7406cOSError: [WinError 1314] Dem Client fehlt ein erforderliches Recht(privilege not held) insetUpClassat thesymlink_toc56dbc616AI-assisted: yes (runs made on the host above).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T10:45:01Z.
Thanks for the run. Failing 2/2 on main with WinError 1314 and passing 2/2 here, on a host with Developer Mode off and a non-elevated shell, is exactly the case this PR targets. I've added it to the review notes.