Skip to content

Test runs on Ubuntu are showing useless stack on failure #20374

@krwq

Description

@krwq

Running test is performed with: Tools\msbuild.sh /t:BuildAndTest project.csproj

example stack trace on Ubuntu 16.04 (obviously big chunk of stack is missing)

  xUnit.net console test runner (64-bit .NET Core)
  Copyright (C) 2014 Outercurve Foundation.
  
  Discovering: System.Security.Cryptography.Xml.Tests
  Discovered:  System.Security.Cryptography.Xml.Tests
  Starting:    System.Security.Cryptography.Xml.Tests
     System.Security.Cryptography.Xml.Tests.EndToEnd.SignedXmlHasVerifiableSignature [FAIL]
        System.PlatformNotSupportedException : Operation is not supported on this platform.
        Stack Trace:
           .../corefx/bin/obj/Unix.AnyCPU.Debug/System.Security.Cryptography.Csp/netcoreapp/System.Security.Cryptography.Csp.notsupported.cs(208,0): at System.Security.Cryptography.SHA1CryptoServiceProvider..ctor()
  Finished:    System.Security.Cryptography.Xml.Tests
  
  === TEST EXECUTION SUMMARY ===

on the first look it looks like somewhere in the code there is something like:

try {
  runtest();
}
catch (Exception e) {
  throw e;
}

replacing throw e; with simply throw; should fix it. I did not investigate where that code is or if that is the problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions