Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Add drvfs and lxfs to GetDriveType #15451

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub merged commit 67cc728 into dotnet:master Jan 25, 2017
@stephentoub stephentoub deleted the drivetype_wsl branch January 25, 2017 04:26
Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks @stephentoub

@weshaggard
Copy link
Member

The PropertiesOfValidDrive test still seem to fail while running on my Ubuntu Docker image on windows.

         /d/git/corefx/bin/AnyOS.AnyCPU.Debug/System.IO.FileSystem.DriveInfo.Tests/netstandard/RunTests.sh /d/git/corefx/Tools/testdotnetcli
         Using as the test runtime folder.
         Running tests... Start time: 21:10:08
         Commands:
         /d/git/corefx/Tools/testdotnetcli/dotnet xunit.console.netcore.exe System.IO.FileSystem.DriveInfo.Tests.dll -xml testResults.xml -notrait Benchmark=true -notrait category=nonnetcoreapp1.1tests -notrait category=OuterLoop -notrait category=failing -notrait category=nonlinuxtests
         /d/git/corefx/bin/AnyOS.AnyCPU.Debug/System.IO.FileSystem.DriveInfo.Tests/netstandard /d/git/corefx/src/System.IO.FileSystem.DriveInfo/tests
         xUnit.net console test runner (64-bit .NET Core)
         Copyright (C) 2014 Outercurve Foundation.
         
         Discovering: System.IO.FileSystem.DriveInfo.Tests
         Discovered:  System.IO.FileSystem.DriveInfo.Tests
         Starting:    System.IO.FileSystem.DriveInfo.Tests
            System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDrive [FAIL]
               Assert.Equal() Failure
               Expected: Fixed
               Actual:   Unknown
               Stack Trace:
                  /d/git/corefx/src/System.IO.FileSystem.DriveInfo/tests/DriveInfo.Unix.Tests.cs(69,0): at System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDrive()
         Finished:    System.IO.FileSystem.DriveInfo.Tests

@stephentoub
Copy link
Member Author

Hmm. Wes, can you see what string is being passed into the GetDriveType function:
https://github.com/dotnet/corefx/pull/15451/files#diff-941e76780713c4bffc85a785df882374R129
such that it's falling through to return Unknown:
https://github.com/dotnet/corefx/pull/15451/files#diff-941e76780713c4bffc85a785df882374R279
?

@weshaggard
Copy link
Member

null.

Here is what we get back from the call to GetFormatInfoFromMountPoint:
NumericFormat=2035054128, name=/, formatBuffer=0, format=null, type=Unknown

We get a buffer of with all zero's which Marshal.PtrToStringAnsi returns null for.

@stephentoub
Copy link
Member Author

Thanks, Wes. Looks like that value corresponds to overlayfs, which is a file system that effectively wraps other file systems. The good news is it's easy for us to add to the table. The bad news is we don't really know what kind of file system it is, since it's wrapping one or more others, so we'll need to weaken the test.

@karelz karelz modified the milestone: 2.0.0 Feb 4, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Add drvfs and lxfs to GetDriveType

Commit migrated from dotnet/corefx@67cc728
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants