fix: let a stream on a foreign SafeFileHandle adopt the handle and drop stale SafeFileHandle test exclusions - #1109
Merged
Merged
Conversation
…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
enabled auto-merge (squash)
September 27, 2026 14:07
vbreuss
disabled auto-merge
September 27, 2026 14:08
vbreuss
enabled auto-merge (squash)
September 27, 2026 14:08
Test Results 50 files - 12 50 suites - 12 1h 19m 36s ⏱️ + 1m 22s 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.This pull request removes 6880 skipped tests and adds 6846 skipped tests. Note that renamed tests count towards both.This pull request skips 1 test. |
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
force-pushed
the
fix/safefilehandle-follow-ups
branch
from
September 27, 2026 16:00
3614b9e to
7e82fc8
Compare
|
|
This is addressed in release v7.1.0. |
This was referenced Sep 28, 2026
Closed
This was referenced Sep 30, 2026
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A real
FileStreamtakes no share of its own on the handle it wraps, so a stream on a handle from theISafeFileHandleStrategymust not conflict with whatever already holds the file open. TheSafeFileHandleoverloads are now exercised by tests, so the coverage exclusions claiming they cannot be tested are removed, together with the legacyUnmanagedFileLoadertests that were never compiled; the behaviours they described are covered by active tests.