Skip to content

fix: handle shared file contents across handles #2192

fix: handle shared file contents across handles

fix: handle shared file contents across handles #2192

Triggered via pull request July 12, 2026 12:56
Status Failure
Total duration 5m 11s
Artifacts 4

ci.yml

on: pull_request
Matrix: Unit tests
Static code analysis
3m 20s
Static code analysis
Publish Tests Results
20s
Publish Tests Results
Fit to window
Zoom out
Zoom in

Annotations

2 errors, 33 warnings, and 1 notice
API tests
Process completed with exit code 255.
API tests
Target "ApiChecks" has thrown an exception
API tests
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
API tests
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
API tests
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
API tests
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (macos-latest)
/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (macos-latest)
/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Unit tests (macos-latest)
/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (macos-latest)
/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/Users/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Unit tests (ubuntu-latest)
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (ubuntu-latest)
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Unit tests (ubuntu-latest)
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (ubuntu-latest)
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(203,45): warning S1192: Define a constant instead of using this literal 'Stream does not support writing.' 7 times. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net9.0]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(44,12): warning S5766: Validate data in this deserialization constructor. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net9.0]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(21,19): warning S3260: Private classes which are not derived in the current assembly should be marked as 'sealed'. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net9.0]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(409,29): warning S2325: Make 'GetTimeAdjustmentsForFileStreamWhenFileExists' a static method. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockDirectoryInfo.cs(42,9): warning S1699: Remove this call from a constructor to the overridable 'Refresh' method. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileInfo.cs(27,9): warning S1699: Remove this call from a constructor to the overridable 'Refresh' method. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(44,12): warning S3776: Refactor this constructor to reduce its Cognitive Complexity from 17 to the 15 allowed. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(203,45): warning S1192: Define a constant instead of using this literal 'Stream does not support writing.' 5 times. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(44,12): warning S5766: Validate data in this deserialization constructor. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Static code analysis
/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/MockFileStream.cs(21,19): warning S3260: Private classes which are not derived in the current assembly should be marked as 'sealed'. [/home/runner/work/System.IO.Abstractions/System.IO.Abstractions/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj::TargetFramework=net472]
Unit tests (windows-latest)
D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Unit tests (windows-latest)
D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (windows-latest)
D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net10.0]
Unit tests (windows-latest)
D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\MockFileStreamTests.cs(36,17): warning CA2022: Avoid inexact read with 'System.IO.Abstractions.FileSystemStream.Read(byte[], int, int)' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2022) [D:\a\System.IO.Abstractions\System.IO.Abstractions\tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests\TestableIO.System.IO.Abstractions.TestingHelpers.Tests.csproj::TargetFramework=net9.0]
Unit tests (macos-latest)
The macos-latest label will migrate to macOS 26 beginning June 15, 2026. For more information see https://github.com/actions/runner-images/issues/14167

Artifacts

Produced during runtime
Name Size Digest
API-tests
60.8 KB
sha256:71bfe5acdb99242170c5679619e6b4916aa0f64184da349ef4706c124536cbbb
Linux-artifacts
693 KB
sha256:b6f8337e84e02cf34abab2876e52ad4ec259f02a7158b86e9325d4e432a7f062
Windows-artifacts
878 KB
sha256:9fb4ef91ff7745d98b3b76733dd57cb4771572e19dab9c38abdb35df494e2d17
macOS-artifacts
694 KB
sha256:1c64f99822c8ae271b93a7d0877273e355b4a9d08cfeabba7c99e88c052d9d32