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

Re-enable Windows test that verifies DriveInfo.VolumeLabel setter fails on SUBST'd drive #59850

Merged
merged 3 commits into from
Nov 25, 2021

Conversation

carlossanlop
Copy link
Member

Fixes #14027

I'm reusing code I recently added to verify SUBST with symbolic links. I moved it to its own class for virtual drive manipulation on Windows.

@carlossanlop carlossanlop added this to the 7.0.0 milestone Oct 1, 2021
@carlossanlop carlossanlop self-assigned this Oct 1, 2021
@ghost
Copy link

ghost commented Oct 1, 2021

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #14027

I'm reusing code I recently added to verify SUBST with symbolic links. I moved it to its own class for virtual drive manipulation on Windows.

Author: carlossanlop
Assignees: carlossanlop
Labels:

area-System.IO

Milestone: 7.0.0

@carlossanlop
Copy link
Member Author

carlossanlop commented Oct 5, 2021

Investigating this failure. I don't know why it is happening in x64 Windows Debug, since it's the one I tested locally:

 src\libraries\System.IO.FileSystem\tests\VirtualDriveSymbolicLinks.Windows.cs(14,17): error CS0246: The type or namespace name 'VirtualDriveHelper' could not be found (are you missing a using directive or an assembly reference?)

Edit: Ah, I think it's the Net5Compat test project.

@adamsitnik
Copy link
Member

@carlossanlop could you solve the conflict?

@carlossanlop
Copy link
Member Author

@jozkee @adamsitnik sorry for the delay. I resolved the conflict: Net5Compat has been recently removed, and that project was also the source of the CI failure. Can you please take a look again?

@carlossanlop
Copy link
Member Author

carlossanlop commented Nov 24, 2021

Edit: I opened issue #62028

The CI leg runtime (Libraries Build windows net48 x86 Release) had a SourceGenerator-related failure.

.dotnet\sdk\6.0.100-rc.2.21505.57\Microsoft.Common.CurrentVersion.targets(3264,5):
error MSB3101: (NETCORE_ENGINEERING_TELEMETRY=Build)
Could not write state file
"D:\a\_work\1\s\artifacts\obj\Microsoft.Interop.SourceGeneration\netstandard2.0-Release\Microsoft.Interop.SourceGeneration.csproj.GenerateResource.cache".
The process cannot access the file
'D:\a\_work\1\s\artifacts\obj\Microsoft.Interop.SourceGeneration\netstandard2.0-Release\Microsoft.Interop.SourceGeneration.csproj.GenerateResource.cache'
because it is being used by another process.

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, I left some comments but they're all related to refactoring ideas. Thank you @carlossanlop !

Comment on lines 156 to 157
string system32 = Path.Join(systemRoot, "System32");
return Path.Join(system32, "subst.exe");
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can provide multiple parameters to Combine and avoid the need of having an additional local variable

Suggested change
string system32 = Path.Join(systemRoot, "System32");
return Path.Join(system32, "subst.exe");
return Path.Join(systemRoot, "System32", "subst.exe");

Copy link
Member Author

Choose a reason for hiding this comment

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

You know, this could be an interesting candidate for a Roslyn Analyzer.

Copy link
Member Author

Choose a reason for hiding this comment

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

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.

DriveInfo tests fail if current user uses SUBST
2 participants