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 long path test to get exception message [NO MERGE] #64079

Closed
wants to merge 1 commit into from

Conversation

danmoseley
Copy link
Member

This reverts commit a7aff06.

Get the string provided by the logging added in e2da32c

Not to be merged.

cc @MattGal

@danmoseley danmoseley added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) area-System.IO labels Jan 21, 2022
@ghost ghost assigned danmoseley Jan 21, 2022
@ghost
Copy link

ghost commented Jan 21, 2022

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

Issue Details

This reverts commit a7aff06.

Get the string provided by the logging added in e2da32c

Not to be merged.

cc @MattGal

Author: danmoseley
Assignees: -
Labels:

* NO MERGE *, area-System.IO

Milestone: -

@MattGal
Copy link
Member

MattGal commented Jan 21, 2022

This reverts commit a7aff06.

Get the string provided by the logging added in e2da32c

Not to be merged.

cc @MattGal

I'm checking it out we just have a happy hour on Thursday afternoons. Will let you know if I find useful stuff... no clue why Az Sec Pack would touch what you're seeing.

@danmoseley
Copy link
Member Author

/azp help

@azure-pipelines
Copy link

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@danmoseley
Copy link
Member Author

/azp list

@azure-pipelines
Copy link

@danmoseley danmoseley closed this Jan 21, 2022
@danmoseley danmoseley reopened this Jan 21, 2022
@danmoseley
Copy link
Member Author

Odd it didn't fail the first time. But we got this:

    System.IO.Tests.Directory_CreateDirectory.DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException [FAIL]
      Assert.All() Failure: 2 out of 2 items in the collection did not pass.
      [1]: Item: \\?\C:\h\w\A10508D1\t\Directory_CreateDirectory_gu5t0c3v.dt3\DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException_271_6934282d\7f0c3b9a425c46d4ac5beae96986f5d3g....ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg\cd18c3798
           Xunit.Sdk.XunitException: Expected one of: (System.IO.PathTooLongException, System.IO.DirectoryNotFoundException) -> Actual: (System.IO.IOException): System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : '\\?\C:\h\w\A10508D1\t\Directory_CreateDirectory_gu5t0c3v.dt3\DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException_271_6934282d\7f0c3b9a425c46d4ac5beae96986f5d3ggggggg....ggggggg\cd18c3798'
              at System.IO.FileSystem.CreateDirectory(String fullPath, Byte[] securityDescriptor) in /_/src/libraries/Common/src/System/IO/FileSystem.DirectoryCreation.Windows.cs:line 138
              at System.IO.Directory.CreateDirectory(String path) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Directory.cs:line 35
              at System.IO.Tests.Directory_CreateDirectory.Create(String path) in /_/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs:line 18
              at System.IO.Tests.Directory_CreateDirectory.<>c__DisplayClass27_0.<DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException>b__1() in /_/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs:line 274
              at System.AssertExtensions.ThrowsAnyInternal(Action action, Type[] exceptionTypes) in /_/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs:line 204
              at System.AssertExtensions.ThrowsAnyInternal(Action action, Type[] exceptionTypes) in /_/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs:line 212
              at System.AssertExtensions.ThrowsAny[TFirstExceptionType,TSecondExceptionType](Action action) in /_/src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs:line 222
              at System.IO.Tests.Directory_CreateDirectory.<DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException>b__27_0(String path) in /_/src/libraries/System.IO.FileSystem/tests/Directory/CreateDirectory.cs:line 274
              at Xunit.Assert.All[T](IEnumerable`1 collection, Action`2 action) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 61

@JeremyKuhne do you know what setting might cause The filename, directory name, or volume label syntax is incorrect. : '\\?\c:\ .... ?

I don't think it has anything to do with long path settings dir \\?\ ... path over 32K gives The filename or extension is too long. whether LongPathsEnabled=0 or not. (dotnet.exe has longPathAware in its manifest.) Anyway as far as I know, that setting is irrelevant if you have \\?\.

@danmoseley
Copy link
Member Author

If not, I'm inclined to call this wierd emergent Windows behavior and adjust the test to allow IOException when on Windows 11 and call it good.

@JeremyKuhne
Copy link
Member

If not, I'm inclined to call this wierd emergent Windows behavior and adjust the test to allow IOException when on Windows 11 and call it good.

That is what I would do. It isn't documented what exception you get exactly when you overflow what will fit in a Windows Unicode string. I don't think it will materially impact .NET users. This test is more for tracking Windows behavior changes, so we can go back and see what changed and when should it come up in some report/scenario.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.IO NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants