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.Numerics.Tensors tests failing on windows/helix #52134

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

[wasm] System.Numerics.Tensors tests failing on windows/helix #52134

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

Comments

@radekdoulik
Copy link
Member

Similar issue to S.T.Json, the line endings are different after round trip.

  fail: [FAIL] System.Numerics.Tensors.Tests.TensorTests.GetArrayString(constructor: CompressedSparse, IsReversedStride = True)
  info: Assert.Equal() Failure
  info:            ↓ (pos 1)
  info: Expected: {\r\n    {\r\n        {0,1},\r\n        {2,3},\r\n
  info: Actual:   {\n    {\n        {0,1},\n        {2,3},\n
  info:            ↑ (pos 1)
  info:    at System.Numerics.Tensors.Tests.TensorTests.GetArrayString(TensorConstructor constructor)
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.Numerics.Tensors.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 910, Errors: 0, Failed: 6, Skipped: 0, Time: 0.766432s
@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 issue to S.T.Json, the line endings are different after round trip.

  fail: [FAIL] System.Numerics.Tensors.Tests.TensorTests.GetArrayString(constructor: CompressedSparse, IsReversedStride = True)
  info: Assert.Equal() Failure
  info:            ↓ (pos 1)
  info: Expected: {\r\n    {\r\n        {0,1},\r\n        {2,3},\r\n
  info: Actual:   {\n    {\n        {0,1},\n        {2,3},\n
  info:            ↑ (pos 1)
  info:    at System.Numerics.Tensors.Tests.TensorTests.GetArrayString(TensorConstructor constructor)
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.Numerics.Tensors.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 910, Errors: 0, Failed: 6, Skipped: 0, Time: 0.766432s
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 removed the untriaged New issue has not been triaged by the area owner label May 5, 2021
@ViktorHofer ViktorHofer added this to the 6.0.0 milestone May 5, 2021
radekdoulik added a commit to radekdoulik/runtime that referenced this issue May 10, 2021
When running `System.Numerics.Tensors` tests on windows and  targeting
`Browser`,the line ending differs between host and target systems.
Compensate for that by using
`Assert.Equal(..., ignoreLineEndingDifferences: true)`.

Also replace the compile time new line when creating `expectedNoSpace`
string.

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 13, 2021
* Fixes: #52134

When running `System.Numerics.Tensors` tests on windows and  targeting
`Browser`,the line ending differs between host and target systems.
Compensate for that by using
`Assert.Equal(..., ignoreLineEndingDifferences: true)`.

Also replace the compile time new line when creating `expectedNoSpace`
string.

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

* Use LineEndingsHelper, make CompiledNewline public

* Enable fixed tests
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label May 13, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 12, 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