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] EnableAggressiveTrimming causing failing tests - System.Diagnostics.Tests.ActivityTest #46768

Closed
mdh1418 opened this issue Jan 8, 2021 · 2 comments · Fixed by #46875
Closed
Labels
Milestone

Comments

@mdh1418
Copy link
Member

mdh1418 commented Jan 8, 2021

In effort to run library tests with AOT compilation on CI #46633, there are a number of failures arising from #46651.

Test suite System.Diagnostics.DiagnosticSource/tests/TestWithConfigSwitches/System.Diagnostics.DiagnosticSource.Switches.Tests.csproj fails with

  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.ActivityIdNonHierarchicalOverflow
  info: Assert.InRange() Failure
  info: Range:  (55 - 56)
  info: Actual: 27
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdFormat_ZeroTraceIdAndSpanIdWithHierarchicalFormat
  info: Assert.Equal() Failure
  info: Expected: Hierarchical
  info: Actual:   W3C
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdFormat_HierarchicalIsDefault
  info: Assert.Equal() Failure
  info: Expected: Hierarchical
  info: Actual:   W3C
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdGenerationInternalParent
  info: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
  info:
  info: Finished:    System.Diagnostics.DiagnosticSource.Switches.Tests.dll

System_diagnostics_diagnosticsource_switches_fail.txt

Repro:
Check out changes in #46651
./build.sh -os Browser -arch wasm -c Release
Remove

<!-- Temporary until https://github.com/mono/linker/issues/1713 is resolved -->
<assembly fullname="Microsoft.DotNet.RemoteExecutor">
<type fullname="Microsoft.DotNet.RemoteExecutor.Program">
<method signature="System.Int32 Main(System.String[])" />
</type>
</assembly>

Modify
catch (Exception e) when (IsIoRelatedException(e) && !disposing)
to be an empty catch

catch
{
}

./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/System.Diagnostics.DiagnosticSource/tests/TestWithConfigSwitches/System.Diagnostics.DiagnosticSource.Switches.Tests.csproj

@ghost
Copy link

ghost commented Jan 8, 2021

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

Issue Details

In effort to run library tests with AOT compilation on CI #46633, there are a number of failures arising from #46651.

Test suite System.Diagnostics.DiagnosticSource/tests/TestWithConfigSwitches/System.Diagnostics.DiagnosticSource.Switches.Tests.csproj fails with

  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.ActivityIdNonHierarchicalOverflow
  info: Assert.InRange() Failure
  info: Range:  (55 - 56)
  info: Actual: 27
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdFormat_ZeroTraceIdAndSpanIdWithHierarchicalFormat
  info: Assert.Equal() Failure
  info: Expected: Hierarchical
  info: Actual:   W3C
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdFormat_HierarchicalIsDefault
  info: Assert.Equal() Failure
  info: Expected: Hierarchical
  info: Actual:   W3C
  info:
  fail: [FAIL] System.Diagnostics.Tests.ActivityTests.IdGenerationInternalParent
  info: System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.
  info:
  info: Finished:    System.Diagnostics.DiagnosticSource.Switches.Tests.dll

System_diagnostics_diagnosticsource_switches_fail.txt

Repro:
Check out changes in #46651
./build.sh -os Browser -arch wasm -c Release
Remove

<!-- Temporary until https://github.com/mono/linker/issues/1713 is resolved -->
<assembly fullname="Microsoft.DotNet.RemoteExecutor">
<type fullname="Microsoft.DotNet.RemoteExecutor.Program">
<method signature="System.Int32 Main(System.String[])" />
</type>
</assembly>

Modify
catch (Exception e) when (IsIoRelatedException(e) && !disposing)
to be an empty catch

catch
{
}

./dotnet.sh build /t:Test /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Release /p:EnableAggressiveTrimming=true /p:RunAOTCompilation=true src/libraries/System.Diagnostics.DiagnosticSource/tests/TestWithConfigSwitches/System.Diagnostics.DiagnosticSource.Switches.Tests.csproj

Author: mdh1418
Assignees: -
Labels:

arch-wasm, area-Infrastructure-libraries

Milestone: -

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Jan 8, 2021
@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Jan 12, 2021
@lewing lewing added this to the 6.0.0 milestone Jan 12, 2021
@radical radical self-assigned this Jan 12, 2021
radical added a commit to radical/runtime that referenced this issue Jan 12, 2021
…ternalParent`

throws `System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.`

Partially fixes dotnet#46768
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 12, 2021
@radical
Copy link
Member

radical commented Jan 12, 2021

[FAIL] System.Diagnostics.Tests.ActivityTests.IdGenerationInternalParent

Others I can reproduce with /p:EnableAggressiveTrimming=true, and no AOT compilation.

@radical radical changed the title wasm AOT library test failure - System.Diagnostics.DiagnosticSource.Switches.Tests [wasm] EnableAggressiveTrimming causing failing tests - System.Diagnostics.Tests.ActivityTest Jan 12, 2021
@radical radical removed their assignment Jan 12, 2021
radical added a commit that referenced this issue Jan 12, 2021
…ternalParent` (#46875)

throws `System.PlatformNotSupportedException : Cannot wait on monitors on this runtime.`

Partially fixes #46768
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 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.

4 participants