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.DriveType reports "unknown" in Windows Subsystem for Linux #18487

Closed
ericeil opened this issue Sep 9, 2016 · 4 comments
Closed

DriveInfo.DriveType reports "unknown" in Windows Subsystem for Linux #18487

ericeil opened this issue Sep 9, 2016 · 4 comments
Assignees
Labels
area-System.IO bug disabled-test The test is disabled in source code against the issue help wanted [up-for-grabs] Good issue for external contributors os-windows-wsl WSL (Windows Subsystem for Linux) OS - Linux binaries running on Windows
Milestone

Comments

@ericeil
Copy link
Contributor

ericeil commented Sep 9, 2016

Running on Ubuntu in Windows Subsystem for Linux, on rs_prerelease build 14915, DriveInfo.DriveType reports "Unknown" for both the Linux file system (/, /usr, etc.) and mounted Windows drives (/mnt/c, etc). I would expect it to report "fixed" for at least the Linux file system, and preferably the mounted Windows drives as well.

The df -T command reports file system names for these, so apparently there is some info available:

Filesystem     Type  1K-blocks      Used Available Use% Mounted on
rootfs         lxfs  498859004 167549372 331309632  34% /
data           lxfs  498859004 167549372 331309632  34% /data
cache          lxfs  498859004 167549372 331309632  34% /cache
mnt            lxfs  498859004 167549372 331309632  34% /mnt
none           tmpfs 498859004 167549372 331309632  34% /dev
none           tmpfs 498859004 167549372 331309632  34% /run
none           tmpfs 498859004 167549372 331309632  34% /run/lock
none           tmpfs 498859004 167549372 331309632  34% /run/shm
none           tmpfs 498859004 167549372 331309632  34% /run/user
none           drvfs 498859004 167549372 331309632  34% /mnt/c

(note that / is "lxfs" and /mnt/c is "drvfs."

This causes a failure in the DriveInfo tests (in DriveInfoUnixTests.PropertiesOfValidDrive). I'll be conditionally disabling that test for now.

@sunilmut
Copy link

Thanks Eric for reporting this. We have opened a bug internally to track this.

@misenesi
Copy link

misenesi commented Oct 3, 2016

Discussed with Eric offline. The issues seems to be that the DriveInfo.DriveType doesn't recognize drvfs and lxfs.

@karelz
Copy link
Member

karelz commented Oct 12, 2016

It looks like we need another case in switch statement for these 2 file systems in DriveInfo.DriveType.

@weshaggard
Copy link
Member

I hit this same test failure when running the tests in an ubuntu docker image on windows.

@stephentoub stephentoub reopened this Jan 26, 2017
joshfree referenced this issue in dotnet/corefx Dec 12, 2017
* Re-enable DriveInfo test on Windows Subsystem for Linux

https://github.com/dotnet/corefx/issues/11570

* Re-enable additional tests on WSL

Related microsoft/WSL#1011 and microsoft/WSL#308

* correct xunit Facts

* Disable some network tests on WSL

Disable some network tests on WindowsSubsystemForLinux due to https://github.com/dotnet/corefx/issues/15513
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO bug disabled-test The test is disabled in source code against the issue help wanted [up-for-grabs] Good issue for external contributors os-windows-wsl WSL (Windows Subsystem for Linux) OS - Linux binaries running on Windows
Projects
None yet
Development

No branches or pull requests

7 participants