runtime: Test runs on Ubuntu are showing useless stack on failure

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.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 24 (24 by maintainers)

Most upvoted comments

I’m not qualified to answer that question. Can we bring over a useful compatible implementation here that works on Unix by using only API that’s available on Unix?

@karelz I didn’t know about GeneratePlatformNotSupportedAssembly. There are about 40 assemblies that have it and al or almost all have it specifically for Unix. We need to check what API those guys have that is in NS2.0. We have a couple of examples here – are there others. It should not be hard to diff and we can take that offline and figure out what to do.