test(tools): skip performance bisect symlink test without Windows symlink privilege #22162

Closed
RaghavVijayanand wants to merge 2 commits from upstream-pr/22162 into main
RaghavVijayanand commented 2026-11-17 07:19:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by RaghavVijayanand on 2026-11-17T07:19:45Z.


What

BuildSymlinkSafetyTests.test_refuses_to_follow_a_build_directory_symlink_outside_the_worktree creates a directory symlink. On Windows without Developer Mode or the symbolic-link privilege, os.symlink raises WinError 1314 and the test errors instead of testing reset_build_dir. The test now skips in that case, using the same check as test_annotate_module.py; other errors still fail.

Tested

Windows 11, Python 3.14.3, no symlink privilege: python -m pytest tools/tests/test_performance_bisect.py gives 62 passed, 1 skipped (was 1 failed). Full tools/tests on the same machine: this was the only failure (2982 passed, 385 skipped). python3 tools/check_conventions.py --base origin/main passes.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5352586788 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22162). Originally posted by [RaghavVijayanand](https://github.com/RaghavVijayanand) on 2026-11-17T07:19:45Z. --- ### What `BuildSymlinkSafetyTests.test_refuses_to_follow_a_build_directory_symlink_outside_the_worktree` creates a directory symlink. On Windows without Developer Mode or the symbolic-link privilege, `os.symlink` raises `WinError 1314` and the test errors instead of testing `reset_build_dir`. The test now skips in that case, using the same check as `test_annotate_module.py`; other errors still fail. ### Tested Windows 11, Python 3.14.3, no symlink privilege: `python -m pytest tools/tests/test_performance_bisect.py` gives 62 passed, 1 skipped (was 1 failed). Full `tools/tests` on the same machine: this was the only failure (2982 passed, 385 skipped). `python3 tools/check_conventions.py --base origin/main` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
copilot-pull-request-reviewer[bot] commented 2026-11-17 07:19:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-17T07:19:53Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5934452711 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22162#pullrequestreview-5934452711). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-17T07:19:53Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
MarcZX10 commented 2026-11-17 07:43:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T07:43:13Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

  • Head reviewed: fd7216af24, base main.
  • Read the description, commit message, manifest, diff and the full text of tools/tests/test_performance_bisect.py at the head.
  • Searched the repository with repo_read.py search for the winerror == 1314 pattern across tools/tests, and for os usage in the changed file.
  • No tests or builds were run in this review.

Results

Check Result Note
Diff matches the description passed Only the test changes; no production code touched
Symlink skip matches the sibling tests passed Same os.name == "nt" and winerror == 1314 check as the other test files
Other OS errors still fail passed Non-1314 errors and non-Windows errors re-raise
import os is new and used once passed No duplicate import in the file
Test suite run here not run Not run in this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

  • The Windows result in the description (62 passed, 1 skipped; full tools/tests run) is the author's report. I did not run it.
  • check_conventions.py is reported by the author as passing; I did not run it.
  • The sibling pattern was confirmed by search only, not by reading each sibling test in full.

Sources

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5934682840 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22162#pullrequestreview-5934682840). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-17T07:43:13Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran - Head reviewed: fd7216af24e455b2bfac819bfb0864651d10dde0, base main. - Read the description, commit message, manifest, diff and the full text of `tools/tests/test_performance_bisect.py` at the head. - Searched the repository with `repo_read.py search` for the `winerror == 1314` pattern across `tools/tests`, and for `os` usage in the changed file. - No tests or builds were run in this review. ## Results | Check | Result | Note | |---|---|---| | Diff matches the description | passed | Only the test changes; no production code touched | | Symlink skip matches the sibling tests | passed | Same `os.name == "nt"` and `winerror == 1314` check as the other test files | | Other OS errors still fail | passed | Non-1314 errors and non-Windows errors re-raise | | `import os` is new and used once | passed | No duplicate import in the file | | Test suite run here | not run | Not run in this review | ## Findings **Blocking** None. **Non-blocking** None. ## Not verified - The Windows result in the description (62 passed, 1 skipped; full `tools/tests` run) is the author's report. I did not run it. - `check_conventions.py` is reported by the author as passing; I did not run it. - The sibling pattern was confirmed by search only, not by reading each sibling test in full. ## Sources - Sibling skip pattern: [test_annotate_module.py, line 926](https://github.com/boykopovar/AnyPS5/blob/fd7216af24e455b2bfac819bfb0864651d10dde0/tools/tests/test_annotate_module.py#L926) ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 09:57:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T09:57:41Z.

Review: APPROVED


Reviewed — looks good

The change adds the missing os import required by the existing symlink test; its skip behavior already catches OSError and NotImplementedError while allowing the test to fail for unrelated errors.

What I ran

Reviewed head 8e6aec0d47004365433ccdc0b601362cf6b51c5c. I did not run tests or commands.

Results

Check Result Note
Changed code review passed One import added
Tests not run No test execution

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run the reported Windows test suite or conventions check. Read tools/tests/test_performance_bisect.py; no files were excluded by the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6004498263 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22162#pullrequestreview-6004498263). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T09:57:41Z. **Review:** APPROVED --- # Reviewed — looks good The change adds the missing `os` import required by the existing symlink test; its skip behavior already catches `OSError` and `NotImplementedError` while allowing the test to fail for unrelated errors. ## What I ran Reviewed head `8e6aec0d47004365433ccdc0b601362cf6b51c5c`. I did not run tests or commands. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | One import added | | Tests | not run | No test execution | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Did not run the reported Windows test suite or conventions check. Read `tools/tests/test_performance_bisect.py`; no files were excluded by the manifest. ## To get this to a good state Nothing is required.
catminou4 commented 2026-11-25 05:48:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by catminou4 on 2026-11-25T05:48:52Z.

Review: COMMENTED


Checked against current main (61d110125e): main already has import os in tools/tests/test_performance_bisect.py (line 5) and the skipTest("symlinks unavailable: ...") guard. The merge of this branch leaves main unchanged (git merge-tree gives the same tree as main), so there is nothing left to merge. This can be closed as already in main.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6052482934 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/22162#pullrequestreview-6052482934). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T05:48:52Z. **Review:** COMMENTED --- Checked against current `main` (61d110125e): `main` already has `import os` in `tools/tests/test_performance_bisect.py` (line 5) and the `skipTest("symlinks unavailable: ...")` guard. The merge of this branch leaves `main` unchanged (`git merge-tree` gives the same tree as `main`), so there is nothing left to merge. This can be closed as already in `main`.

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!22162
No description provided.