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

[wasm] System.CodeDom tests failing on windows #52107

Closed
radekdoulik opened this issue Apr 30, 2021 · 1 comment · Fixed by #52540
Closed

[wasm] System.CodeDom tests failing on windows #52107

radekdoulik opened this issue Apr 30, 2021 · 1 comment · Fixed by #52540
Assignees
Labels
Milestone

Comments

@radekdoulik
Copy link
Member

Similar to #52106 it has these issues:

  • Line ending, where we compare json text format after round trip and line ending differs (CFLF vs LF)
  • the tests timeouts on Helix - might be performance related

Example failure:

  fail: [FAIL] System.CodeDom.Compiler.Tests.CSharpCodeGenerationTests.MethodTypeParameterConstraintLineOnlyAddedForTypesThatHaveConstraints
  info: Assert.Equal() Failure
  info:           ↓ (pos 0)
  info: Expected: \r\npublic class ClassWithGenericMethod {\r\n
  info: Actual:   \npublic class ClassWithGenericMethod {\n\np
  info:           ↑ (pos 0)
  info:    at System.CodeDom.Compiler.Tests.CodeGenerationTests.AssertEqualPreserveLineBreaks(CodeObject c, String expected)
  info:    at System.CodeDom.Compiler.Tests.CSharpCodeGenerationTests.MethodTypeParameterConstraintLineOnlyAddedForTypesThatHaveConstraints()
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.CodeDom.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 5974, Errors: 0, Failed: 8, Skipped: 5, Time: 5.468263s

The timeout is weird, as locally it only takes about 5s to run.

@radekdoulik radekdoulik self-assigned this Apr 30, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Similar to #52106 it has these issues:

  • Line ending, where we compare json text format after round trip and line ending differs (CFLF vs LF)
  • the tests timeouts on Helix - might be performance related

Example failure:

  fail: [FAIL] System.CodeDom.Compiler.Tests.CSharpCodeGenerationTests.MethodTypeParameterConstraintLineOnlyAddedForTypesThatHaveConstraints
  info: Assert.Equal() Failure
  info:           ↓ (pos 0)
  info: Expected: \r\npublic class ClassWithGenericMethod {\r\n
  info: Actual:   \npublic class ClassWithGenericMethod {\n\np
  info:           ↑ (pos 0)
  info:    at System.CodeDom.Compiler.Tests.CodeGenerationTests.AssertEqualPreserveLineBreaks(CodeObject c, String expected)
  info:    at System.CodeDom.Compiler.Tests.CSharpCodeGenerationTests.MethodTypeParameterConstraintLineOnlyAddedForTypesThatHaveConstraints()
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.CodeDom.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 5974, Errors: 0, Failed: 8, Skipped: 5, Time: 5.468263s

The timeout is weird, as locally it only takes about 5s to run.

Author: radekdoulik
Assignees: radekdoulik
Labels:

arch-wasm, area-Infrastructure-mono

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Apr 30, 2021
@ViktorHofer ViktorHofer added this to the 6.0.0 milestone May 5, 2021
@ViktorHofer ViktorHofer removed the untriaged New issue has not been triaged by the area owner label May 5, 2021
@radekdoulik radekdoulik changed the title [wasm] System..CodeDom tests failing on windows [wasm] System.CodeDom tests failing on windows May 10, 2021
radekdoulik added a commit to radekdoulik/runtime that referenced this issue May 10, 2021
Fixes: dotnet#52107

When running `System.CodeDom` tests on windows and  targeting
`Browser`, the line ending differs between host and target systems.
Add helper `LineEndingsHelper.Normalize` method to update expected
strings.

The `Browser` Environment.NewLine is `\n`, while windows use `\r\n`.
https://github.com/dotnet/runtime/blob/5bd0edfe860e41bdfd690d3743e730594307292e/src/libraries/System.Private.CoreLib/src/System/Environment.UnixOrBrowser.cs#L51
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label May 10, 2021
radekdoulik added a commit that referenced this issue May 12, 2021
Fixes: #52107

When running `System.CodeDom` tests on windows and  targeting
`Browser`, the line ending differs between host and target systems.
Add helper `LineEndingsHelper.Normalize` method to update expected
strings.

The `Browser` Environment.NewLine is `\n`, while windows use `\r\n`.
https://github.com/dotnet/runtime/blob/5bd0edfe860e41bdfd690d3743e730594307292e/src/libraries/System.Private.CoreLib/src/System/Environment.UnixOrBrowser.cs#L51
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants