Skip to content

DriveInfo tests fail if current user uses SUBST #14027

Closed
@terrajobst

Description

@terrajobst

On my machine I'm using SUBST to map folders as drives. This causes the the drive info tests to fail:

System.IO.FileSystem.DriveInfoTests.Get_VolumeLabel.Test01 [FAIL]
   System.IO.IOException : The directory is not a subdirectory of the root directory.

   Stack Trace:
      p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\src\System\IO\DriveInfo.Windows.cs(235,0): at System.IO.DriveInfo.set_VolumeLabel(String value)
      p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\tests\GetVolumeLabelTests.cs(74,0): at System.IO.FileSystem.DriveInfoTests.Get_VolumeLabel.Test01()

System.IO.FileSystem.DriveInfoTests.Set_VolumeLabel.Test01 [FAIL]
   System.IO.IOException : The directory is not a subdirectory of the root directory.

   Stack Trace:
      p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\src\System\IO\DriveInfo.Windows.cs(235,0): at System.IO.DriveInfo.set_VolumeLabel(String value)
      p:\oss\corefx\src\System.IO.FileSystem.DriveInfo\tests\SetVolumeLabelTests.cs(75,0): at System.IO.FileSystem.DriveInfoTests.Set_VolumeLabel.Test01()

I would expect the drive info tests to be resilient to this.

Metadata

Metadata

Assignees

Labels

area-System.IOdisabled-testThe test is disabled in source code against the issuetest-bugProblem in test source code (most likely)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions