Skip tests that invoke DumpHeap command on .NET 5.0 x86. (#1290)
authorJustin Anderson <jander-msft@users.noreply.github.com>
Thu, 25 Jun 2020 20:44:54 +0000 (13:44 -0700)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2020 20:44:54 +0000 (13:44 -0700)
src/SOS/SOS.UnitTests/SOS.cs

index 338abcec29e59d2c578d45ecfa1b0f2a686e5ae5..4727c546c0dbd2d3ded4f64ae2a4b8cbfdbb169c 100644 (file)
@@ -106,6 +106,15 @@ public class SOS
         }
     }
 
+    private static void SkipForIssue1289(TestConfiguration config)
+    {
+        // https://github.com/dotnet/diagnostics/issues/1289
+        if (config.IsNETCore && config.RuntimeFrameworkVersionMajor == 5 && config.TargetArchitecture == "x86")
+        {
+            throw new SkipTestException("DumpHeap command output does not contain 'Statistics' on .NET 5.0 x86.");
+        }
+    }
+
     [SkippableTheory, MemberData(nameof(Configurations))]
     public async Task DivZero(TestConfiguration config)
     {
@@ -115,6 +124,8 @@ public class SOS
     [SkippableTheory, MemberData(nameof(Configurations))]
     public async Task GCTests(TestConfiguration config)
     {
+        SkipForIssue1289(config);
+
         SkipIfArm(config);
 
         // Live only
@@ -171,6 +182,8 @@ public class SOS
     [SkippableTheory, MemberData(nameof(Configurations))]
     public async Task OtherCommands(TestConfiguration config)
     {
+        SkipForIssue1289(config);
+
         // This debuggee needs the directory of the exes/dlls to load the SymbolTestDll assembly.
         await RunTest("OtherCommands.script", information: new SOSRunner.TestInformation {
             TestConfiguration = config,
@@ -209,6 +222,8 @@ public class SOS
     [SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "SOS.WebApp3")]
     public async Task WebApp3(TestConfiguration config)
     {
+        SkipForIssue1289(config);
+
         await RunTest("WebApp.script", testLive: false, information: new SOSRunner.TestInformation {
             TestConfiguration = config,
             DebuggeeName = "WebApp3",
@@ -220,6 +235,8 @@ public class SOS
     [SkippableTheory, MemberData(nameof(GetConfigurations), "TestName", "SOS.DualRuntimes")]
     public async Task DualRuntimes(TestConfiguration config)
     {
+        SkipForIssue1289(config);
+
         // The assembly path, class and function name of the desktop test code to load/run
         string desktopTestParameters = TestConfiguration.MakeCanonicalPath(config.GetValue("DesktopTestParameters"));
         if (string.IsNullOrEmpty(desktopTestParameters))