Remove resolved ActiveIssue(#14378) skip attributes from IO.FileSystem tests#125092
Remove resolved ActiveIssue(#14378) skip attributes from IO.FileSystem tests#125092
Conversation
…lved Co-authored-by: ViveliDuCh <50237907+ViveliDuCh@users.noreply.github.com>
|
Tagging subscribers to this area: @dotnet/area-system-io |
There was a problem hiding this comment.
Pull request overview
This PR removes 6 [ActiveIssue("https://github.com/dotnet/runtime/issues/14378")] skip attributes from 4 System.IO.FileSystem test files, re-enabling tests that were permanently skipped while waiting for a mechanism to test machine-wide state (like mounting network drives). All tests retain [PlatformSpecific(TestPlatforms.Windows)] and will still skip on non-Windows.
Changes:
- Remove
ActiveIssueskip attribute fromDelete_MountVolume.cs::RunTest(volume mount deletion scenarios) - Remove
ActiveIssueskip attribute fromReparsePoints_MountVolume.cs::runTest(GetDirectories/GetFilesthrough mount points) - Remove
ActiveIssueskip attributes fromExists.cs::NotReadyDriveAsPath_ReturnsFalseandSubdirectoryOnNotReadyDriveAsPath_ReturnsFalse - Remove
ActiveIssueskip attributes fromCreateDirectory.cs::NotReadyDriveAsPath_ThrowsDirectoryNotFoundExceptionandSubdirectoryOnNotReadyDriveAsPath_ThrowsIOException
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
Directory/Delete_MountVolume.cs |
Removes [ActiveIssue] from RunTest, which tests directory deletion through Windows volume mount points |
Directory/ReparsePoints_MountVolume.cs |
Removes [ActiveIssue] from runTest, which tests GetDirectories/GetFiles traversal through volume mount points |
Directory/Exists.cs |
Removes [ActiveIssue] from two tests that check Directory.Exists behavior on not-ready drives |
Directory/CreateDirectory.cs |
Removes [ActiveIssue] from two tests that check Directory.CreateDirectory behavior on not-ready drives |
...aries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/ReparsePoints_MountVolume.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete_MountVolume.cs
Outdated
Show resolved
Hide resolved
… privileges and NTFS Co-authored-by: ViveliDuCh <50237907+ViveliDuCh@users.noreply.github.com>
src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Exists.cs
Outdated
Show resolved
Hide resolved
…ditionalFact in Exists.cs and CreateDirectory.cs Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/CreateDirectory.cs
Outdated
Show resolved
Hide resolved
...aries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/ReparsePoints_MountVolume.cs
Outdated
Show resolved
Hide resolved
…mplify ConditionalFact for not-ready drive tests Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
|
@copilot, please fix the build errors |
…Net.XUnitExtensions using Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com>
Fixed in 62d7087. Adding |
|
@copilot please address the test failures
|
…ws() to prevent TypeInitializationException on non-Windows Co-authored-by: ViveliDuCh <50237907+ViveliDuCh@users.noreply.github.com>
Fixed in 4cb2e84. The |
Issue #14378 has been resolved, but 6 test methods across 4 files were still decorated with
[ActiveIssue("https://github.com/dotnet/runtime/issues/14378")], causing them to be permanently skipped on all platforms.Description
Directory/Delete_MountVolume.cs— un-skipRunTest(volume mount deletion scenarios); guarded with[ConditionalFact(nameof(IsNtfs))]whereIsNtfschecksFileSystemDebugInfo.IsCurrentDriveNTFS()Directory/ReparsePoints_MountVolume.cs— un-skiprunTest(GetDirectories/GetFilesthrough mount points); guarded with[ConditionalFact(nameof(IsNtfs))]for the same reasonDirectory/Exists.cs— un-skipNotReadyDriveAsPath_ReturnsFalseandSubdirectoryOnNotReadyDriveAsPath_ReturnsFalse; converted to[ConditionalFact]withthrow new SkipTestException(...)in the test body so tests are properly reported as skipped (not silently passed) when no not-ready drive is availableDirectory/CreateDirectory.cs— un-skipNotReadyDriveAsPath_ThrowsDirectoryNotFoundExceptionandSubdirectoryOnNotReadyDriveAsPath_ThrowsIOException; converted to[ConditionalFact]withthrow new SkipTestException(...)for the same reason; fixed CS0121 ambiguity onToTheoryData()caused by addingusing Microsoft.DotNet.XUnitExtensions;The two mount-volume tests use
[ConditionalFact(nameof(IsNtfs))]whereIsNtfschecks onlyFileSystemDebugInfo.IsCurrentDriveNTFS(), ensuring the tests run only when the current drive is NTFS (required by theSetVolumeMountPointWin32 API).The four not-ready-drive tests use plain
[ConditionalFact](required to enableSkipTestExceptionto work correctly) together withthrow new SkipTestException(...)in the test body when no not-ready drive is found. The drive is looked up once via astatic readonly string? s_notReadyDrivefield guarded withOperatingSystem.IsWindows()so thatIOServices.GetNotReadyDrive()(which P/Invokes intokernel32.dll) is not called on non-Windows platforms, preventingTypeInitializationException/DllNotFoundExceptionduring class loading. This replaces the oldConsole.WriteLine + returnanti-pattern that caused tests to silently pass with zero assertions.All tests retain
[PlatformSpecific(TestPlatforms.Windows)]and will continue to be skipped on non-Windows platforms.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.