Skip to content

fix: let a stream on a foreign SafeFileHandle adopt the handle and drop stale SafeFileHandle test exclusions - #1109

Merged
vbreuss merged 3 commits into
mainfrom
fix/safefilehandle-follow-ups
Sep 27, 2026
Merged

vbreuss merged 3 commits into
mainfrom
fix/safefilehandle-follow-ups

Conversation

@vbreuss

@vbreuss vbreuss commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

A real FileStream takes no share of its own on the handle it wraps, so a stream on a handle from the ISafeFileHandleStrategy must not conflict with whatever already holds the file open. The SafeFileHandle overloads are now exercised by tests, so the coverage exclusions claiming they cannot be tested are removed, together with the legacy UnmanagedFileLoader tests that were never compiled; the behaviours they described are covered by active tests.

…op stale SafeFileHandle test exclusions

A real FileStream takes no share of its own on the handle it wraps, so a stream on a handle from the ISafeFileHandleStrategy must not conflict with whatever already holds the file open. The SafeFileHandle overloads are now exercised by tests, so the coverage exclusions claiming they cannot be tested are removed, together with the legacy UnmanagedFileLoader tests that were never compiled; the behaviours they described are covered by active tests.
@vbreuss vbreuss self-assigned this Sep 27, 2026
Copilot AI lite review requested due to automatic review settings September 27, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vbreuss
vbreuss enabled auto-merge (squash) September 27, 2026 14:07
@vbreuss
vbreuss disabled auto-merge September 27, 2026 14:08
@vbreuss
vbreuss enabled auto-merge (squash) September 27, 2026 14:08
@github-actions

Copy link
Copy Markdown

Test Results

     50 files   -    12       50 suites   - 12   1h 19m 36s ⏱️ + 1m 22s
 64 267 tests  -   294   57 378 ✅  -   262   6 888 💤  -  33  1 ❌ +1 
143 776 runs   - 5 790  125 131 ✅  - 5 326  18 644 💤  - 465  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 78fa9a8. ± Comparison against base commit 99d4ef0.

This pull request removes 61502 and adds 61207 tests. Note that renamed tests count towards both.
  )
)
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ CreateDirectory_NullDirectorySecurity_ShouldThrowArgumentNullException
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ CreateDirectory_ShouldChangeAccessControl(bar)
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ CreateDirectory_ShouldChangeAccessControl(bar\foo)
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ GetAccessControl_ShouldBeInitializedWithNotNullValue
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ GetAccessControl_ShouldReturnSetResult
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ GetAccessControl_WithAccessControlSections_ShouldBeInitializedWithNotNullValue
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ GetAccessControl_WithAccessControlSections_ShouldReturnSetResult
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ SetAccessControl_ShouldChangeAccessControl
…
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(0b1890c5-cdce-43da-ae0b-6308d7bddd37)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(12ba2273-2073-41e3-8297-a50537eb20a6)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(17c37347-8b99-4d1e-9a24-d6046988a258)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(18340891-658d-4df0-a348-e0fa1a9ac13d)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(1fb0988d-b94b-45d3-ad0a-ee1f64d03a72)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(2221a0bf-2563-4e64-a4cd-9438ee15b910)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(2511e72c-ac19-4fb8-8aea-17cdbb388040)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(2e8c26ab-e5f4-4af0-a0d4-d3bb8eabb7a4)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(2f167830-7013-4929-8ca9-bbcc56d8b59a)
Testably.Abstractions.Compression.Tests.ZipArchive.Tests ‑ Comment_ShouldBeSettable(30d73a95-811b-410c-8bcd-31a969e65f39)
…
This pull request removes 6880 skipped tests and adds 6846 skipped tests. Note that renamed tests count towards both.
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ GetAccessControl_WithAccessControlSections_ShouldBeInitializedWithNotNullValue
Testably.Abstractions.AccessControl.Tests.DirectoryAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ GetAccessControl_WithAccessControlSections_ShouldBeInitializedWithNotNullValue
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(07ed4af3-d647-4545-98ba-6787c0e087d1)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(1f378e09-fb4c-4579-82c7-5a08b6975e0e)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(1fc18b66-1d3c-4cf5-9d06-94b12232961d)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(21cfdea0-115e-4393-8974-26d03a2ce77a)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(5ca1dfe5-c4c8-484f-bf0c-fc5dfa04b23b)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(5e33bdf1-109d-4824-8a01-67bc7762fd98)
Testably.Abstractions.AccessControl.Tests.DirectoryInfoAclExtensionsTests ‑ SetAccessControl_ShouldNotUpdateTimes(66c8e78a-9c24-4492-a9c1-bd703acbccc0)
…
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(2e1c46f0-0a4f-4be4-8086-03789e2819b5)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(3d7d2cf2-ead2-4dad-9132-c572f951d090)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(58be1466-971f-447b-a57c-e629f26730fe)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(7cd8bcf8-2c85-4c25-b00e-aeba9a0f4b67)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(87ec72ad-894f-4971-842a-c0aac277e3ac)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ GetUnixFileMode_SafeFileHandle_ShouldThrowPlatformNotSupportedExceptionOnWindows(df4c43c5-f93f-4d04-9a7b-c3b33aa84373)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ SetUnixFileMode_SafeFileHandle_ShouldUpdateValue(276b29ed-86f9-4d0a-b8d6-b990ea940a37, None)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ SetUnixFileMode_SafeFileHandle_ShouldUpdateValue(3c5b3796-1a3e-4ba8-9eb0-2f27a725afed, None)
Testably.Abstractions.Testing.Tests.FileSystem.FileMockTests ‑ SetUnixFileMode_SafeFileHandle_ShouldUpdateValue(e514182c-02a7-48b6-8768-373b17436ae3, None)
Testably.Abstractions.Testing.Tests.FileSystem.FileStreamFactoryMockTests ‑ New_ShouldSetUnixFileMode(Append, 4e765681-5aef-4205-992e-b2c74479892b)
…
This pull request skips 1 test.
Testably.Abstractions.MemoryMappedFiles.Tests.MemoryMappedFile.Tests ‑ CreateNewAndOpenExisting_OnRealFileSystem_ShouldRoundtrip

When the token is already cancelled before the channel read starts, the read fails with a TaskCanceledException, which made the tests flaky on slow CI agents.
@vbreuss
vbreuss force-pushed the fix/safefilehandle-follow-ups branch from 3614b9e to 7e82fc8 Compare September 27, 2026 16:00
@sonarqubecloud

Copy link
Copy Markdown

@vbreuss
vbreuss merged commit 11c5efb into main Sep 27, 2026
15 checks passed
@vbreuss
vbreuss deleted the fix/safefilehandle-follow-ups branch September 27, 2026 16:43
@github-actions

Copy link
Copy Markdown

This is addressed in release v7.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants