dotnet / dotnet/roslyn

Disabled cases in CreateAbsoluteUri_LocalPaths_Unix

Open
#83,116 1 comment 0 reactions 0 assignees View on GitHub
Area-IDE Test-Gap
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

In commit 1689311798f80d8f26f830fb07c5e9539bacc0ae inside PR #83052 several cases were deleted from the theory `CreateAbsoluteUri_LocalPaths_Unix`. These were failing on Linux with various errors. Given that the tests hadn't previously ran on Linux the suspicion is these were not correct.

Error messages include:

```
Microsoft.CodeAnalysis.LanguageServer.UnitTests.ProtocolConversionsTests.CreateRelativePatternBaseUri_LocalPaths_Unix(filePath: "\\\\\\\\\\‎", expectedRelativeUri: "file:///////%E2%80%8E") (<
1ms): Error Message: System.IndexOutOfRangeException : Index was outside the bounds of the array.
Stack Trace:
at System.Uri.CreateUriInfo(Flags cF)
at System.Uri.EnsureUriInfo()
at System.Uri.ParseRemaining()
at System.Uri.InitializeUri(ParsingError err, UriKind uriKind, UriFormatException& e)
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString, UriKind uriKind)
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.CreateAbsoluteUri(String absolutePath) in /home/jaredpar/code/roslyn/src/LanguageServer/Protocol/Extensions/ProtocolConversions.
cs:line 205
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.CreateRelativePatternBaseUri(String path) in /home/jaredpar/code/roslyn/src/LanguageServer/Protocol/Extensions/ProtocolConversio
ns.cs:line 243
at Microsoft.CodeAnalysis.LanguageServer.UnitTests.ProtocolConversionsTests.CreateRelativePatternBaseUri_LocalPaths_Unix(String filePath, String expectedRelativeUri) in /home/jaredpar/code/
roslyn/src/LanguageServer/ProtocolUnitTests/ProtocolConversionsTests.cs:line 155
at InvokeStub_ProtocolConversionsTests.CreateRelativePatternBaseUri_LocalPaths_Unix(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
```

Contributor guide

Open the contributing guide

Research direction

Start with ProtocolConversionsTests.cs at CreateRelativePatternBaseUri_LocalPaths_Unix and ProtocolConversions.cs at CreateAbsoluteUri, then compare commit 1689311798f80d8f26f830fb07c5e9539bacc0ae and PR #83052. Run the affected theory on Linux and determine whether the removed cases are invalid inputs or expose a Uri handling problem; done means the cases have an explained, passing outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.