Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DriveInfo tests fail if current user uses SUBST #14027

Closed
terrajobst opened this issue Jan 29, 2015 · 5 comments · Fixed by #59850
Closed

DriveInfo tests fail if current user uses SUBST #14027

terrajobst opened this issue Jan 29, 2015 · 5 comments · Fixed by #59850
Assignees
Labels
area-System.IO disabled-test The test is disabled in source code against the issue test-bug Problem in test source code (most likely)
Milestone

Comments

@terrajobst
Copy link
Member

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.

@terrajobst
Copy link
Member Author

@Priya91, can you take a look?

@Priya91
Copy link
Contributor

Priya91 commented Jan 29, 2015

@terrajobst yes, working on this.

@Yomodo
Copy link

Yomodo commented Jan 31, 2015

According to MSDN, a SUBST.EXE created mapping should NOT be considered a valid mapped drive.

We follow the same in our project, https://github.com/alphaleonis/AlphaFS

weshaggard referenced this issue in weshaggard/corefx Feb 4, 2015
Disable running tests for this project as many of them are failing randomly for
different reasons, including but not limited to requiring admin to set/reset drive
labels, doing exact total disk space comparisions while other disk IO on the system
may be changing it actively, and failing on subst drives, etc
There are various github issues covering some of these see:
https://github.com/dotnet/corefx/issues/514
https://github.com/dotnet/corefx/issues/528
https://github.com/dotnet/corefx/issues/549
https://github.com/dotnet/corefx/issues/564
https://github.com/dotnet/corefx/issues/592
@JeremyKuhne
Copy link
Member

Triage: Rare case, but disabled test. We should fix.

@JeremyKuhne
Copy link
Member

As mentioned above https://github.com/dotnet/corefx/issues/549#issuecomment-72322352 this type of drive shouldn't be considered. Need to look deeper at expected behavior in this case and update tests to either skip in this case or handle appropriately.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@JeremyKuhne JeremyKuhne removed the untriaged New issue has not been triaged by the area owner label Mar 3, 2020
@carlossanlop carlossanlop modified the milestones: Future, 5.0.0, 6.0.0 Jun 18, 2020
@adamsitnik adamsitnik modified the milestones: 6.0.0, Future Jul 22, 2021
@carlossanlop carlossanlop self-assigned this Oct 1, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Oct 1, 2021
@carlossanlop carlossanlop removed the help wanted [up-for-grabs] Good issue for external contributors label Oct 1, 2021
@carlossanlop carlossanlop modified the milestones: Future, 7.0.0 Oct 1, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Nov 25, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO disabled-test The test is disabled in source code against the issue test-bug Problem in test source code (most likely)
Projects
None yet
9 participants