Skip to content

[tests] Relax SpecialFolder write access checks Fixes #26225 - #26233

Merged
rolfbjarne merged 3 commits into
mainfrom
dev/rolf/issue-26225-linksdk-specialfolder
Jul 22, 2026
Merged

rolfbjarne merged 3 commits into
mainfrom
dev/rolf/issue-26225-linksdk-specialfolder

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

The SpecialFolder test writes temporary files to verify expected folder access, but access to macOS privacy-protected folders depends on the host's TCC state.

Make the write-access expectation optional and skip that probe for protected folders on macOS and Mac Catalyst, while preserving path and existence assertions.

Fixes #26225

🤖 Pull request created by Copilot

Fixes #26225

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b9e1dd56-a66c-4e93-b2cc-32f5d7c85d4b
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b9e1dd56-a66c-4e93-b2cc-32f5d7c85d4b
Copilot AI review requested due to automatic review settings July 22, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the LinkSdkRegressionTest.SpecialFolder test to avoid flaky write-access probes against privacy-protected special folders whose behavior varies with the host machine’s TCC permissions (macOS / Mac Catalyst).

Changes:

  • Make TestFolder’s readOnly expectation nullable and skip the write probe when it’s null.
  • Skip write-access probing for macOS Desktop and macOS/Mac Catalyst MyDocuments, while preserving path and existence assertions.
  • Update the CI-tolerant helper to avoid write probing for macOS special folders whose accessibility can vary by host TCC state.

Comment thread tests/linker/link sdk/LinkSdkRegressionTest.cs Outdated
Comment thread tests/linker/link sdk/LinkSdkRegressionTest.cs Outdated
Use collision-safe temporary filenames, tolerate cleanup failures that can result from file-system permissions, and clarify that the TCC behavior is macOS-specific.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b9e1dd56-a66c-4e93-b2cc-32f5d7c85d4b
@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne
rolfbjarne enabled auto-merge (squash) July 22, 2026 12:24
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 229fb584885e2d23dfb6592e96223e1c36123c00 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #229fb58] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 203 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 229fb584885e2d23dfb6592e96223e1c36123c00 [PR build]

@rolfbjarne
rolfbjarne merged commit 1d464e0 into main Jul 22, 2026
56 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/issue-26225-linksdk-specialfolder branch July 22, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] LinkSdk SpecialFolder intermittently reports protected folders as writable

4 participants