test(tools): skip the select_tests symlink-loop test without symlink support #16172

Closed
joafern22 wants to merge 1 commit from upstream-pr/16172 into main
joafern22 commented 2026-11-05 19:24:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by joafern22 on 2026-11-05T19:24:52Z.


What

test_looping_subdirectory_is_skipped (test_registration) and test_looping_subdirectory_is_skipped_when_recovering_commands (select_tests_MissingCommandTests) create a symbolic-link loop with os.symlink and fail on Windows without symbolic-link privileges:

OSError: [WinError 1314] A required privilege is not held by the client

Same fix as 02e5fbda82 for the build_web symlink-loop test: catch (NotImplementedError, OSError) around only the two os.symlink calls and skip. The assertions stay outside the catch. A junction fallback, as in SelectFixture, cannot build the loop: _winapi.CreateJunction needs an existing target (WinError 2).

Tested

Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 UCRT posix-seh r7, Python 3.13, main 04cdd52760:

Developer Mode test_registration select_tests_MissingCommandTests
off, main Failed (WinError 1314) Failed (WinError 1314)
off, this PR Passed, OK (skipped=1) Passed, OK (skipped=1)
on, this PR Passed, OK Passed, OK

python tools/check_conventions.py passes.

Checklist

  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (Python tool tests)
  • AI-assisted: yes (Claude)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5177402160 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16172). Originally posted by [joafern22](https://github.com/joafern22) on 2026-11-05T19:24:52Z. --- ### What `test_looping_subdirectory_is_skipped` (`test_registration`) and `test_looping_subdirectory_is_skipped_when_recovering_commands` (`select_tests_MissingCommandTests`) create a symbolic-link loop with `os.symlink` and fail on Windows without symbolic-link privileges: OSError: [WinError 1314] A required privilege is not held by the client Same fix as 02e5fbda82 for the `build_web` symlink-loop test: catch `(NotImplementedError, OSError)` around only the two `os.symlink` calls and skip. The assertions stay outside the catch. A junction fallback, as in `SelectFixture`, cannot build the loop: `_winapi.CreateJunction` needs an existing target (`WinError 2`). ### Tested Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 UCRT posix-seh r7, Python 3.13, `main` 04cdd52760: | Developer Mode | `test_registration` | `select_tests_MissingCommandTests` | | --- | --- | --- | | off, `main` | Failed (WinError 1314) | Failed (WinError 1314) | | off, this PR | Passed, `OK (skipped=1)` | Passed, `OK (skipped=1)` | | on, this PR | Passed, `OK` | Passed, `OK` | `python tools/check_conventions.py` passes. ### Checklist - Depends on: none - Fixes: none - Unblocks: none - GPUs tested: n/a (Python tool tests) - AI-assisted: yes (Claude)

Pull request closed

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
boykopovar/AnyPS5!16172
No description provided.