[test] Mark EventPipe tests JITStress Incompatible and Partially GC Stress Incompatib...
authorJohn Salem <josalem@microsoft.com>
Tue, 10 Sep 2019 22:17:09 +0000 (15:17 -0700)
committerGitHub <noreply@github.com>
Tue, 10 Sep 2019 22:17:09 +0000 (15:17 -0700)
* Mark all EventPipe tests as JitOptimizationSensitive
* Mark EventPipe GC tests as GCStressIncompatible
* Reduce number of GCs triggered for EventPipe GC tests to make them more diagnosable in the event of failure

Commit migrated from https://github.com/dotnet/coreclr/commit/d4e66769a2560ab7737c5c63b3702b245378ea2b

src/coreclr/tests/src/tracing/eventpipe/buffersize/buffersize.csproj
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.cs
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/ExceptionThrown_V1.csproj
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/GCEvents.cs
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/GCEvents.csproj
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/GCFinalizers.cs
src/coreclr/tests/src/tracing/eventpipe/eventsvalidation/GCFinalizers.csproj
src/coreclr/tests/src/tracing/eventpipe/providervalidation/providervalidation.csproj
src/coreclr/tests/src/tracing/eventpipe/rundownvalidation/rundownvalidation.csproj

index af9f76f..e3f412d 100644 (file)
@@ -7,6 +7,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>0</CLRTestPriority>
     <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(MSBuildProjectName).cs" />
index 4051095..444b28d 100644 (file)
@@ -27,7 +27,7 @@ namespace Tracing.Tests.ExceptionThrown_V1
 
         private static Dictionary<string, ExpectedEventCount> _expectedEventCounts = new Dictionary<string, ExpectedEventCount>()
         {
-            { "Microsoft-Windows-DotNETRuntime", 1000 },
+            { "Microsoft-Windows-DotNETRuntime", new ExpectedEventCount(1000, 0.2f) },
             { "Microsoft-Windows-DotNETRuntimeRundown", -1 },
             { "Microsoft-DotNETCore-SampleProfiler", -1 }
         };
index 4eb4886..c152b0d 100644 (file)
@@ -7,6 +7,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>1</CLRTestPriority>
     <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="ExceptionThrown_V1.cs" />
index adb9eec..31bd0c6 100644 (file)
@@ -35,9 +35,9 @@ namespace Tracing.Tests.GCEvents
 
         private static Action _eventGeneratingAction = () => 
         {
-            for (int i = 0; i < 1000; i++)
+            for (int i = 0; i < 50; i++)
             {
-                if (i % 100 == 0)
+                if (i % 10 == 0)
                     Logger.logger.Log($"Called GC.Collect() {i} times...");
                 ProviderValidation providerValidation = new ProviderValidation();
                 providerValidation = null;
@@ -67,17 +67,17 @@ namespace Tracing.Tests.GCEvents
 
                 Logger.logger.Log("GCStartEvents: " + GCStartEvents);
                 Logger.logger.Log("GCEndEvents: " + GCEndEvents);
-                bool GCStartStopResult = GCStartEvents >= 1000 && GCEndEvents >= 1000 && GCStartEvents == GCEndEvents;
+                bool GCStartStopResult = GCStartEvents >= 50 && GCEndEvents >= 50 && Math.Abs(GCStartEvents - GCEndEvents) <=2;
                 Logger.logger.Log("GCStartStopResult check: " + GCStartStopResult);
 
                 Logger.logger.Log("GCRestartEEStartEvents: " + GCRestartEEStartEvents);
                 Logger.logger.Log("GCRestartEEStopEvents: " + GCRestartEEStopEvents);
-                bool GCRestartEEStartStopResult = GCRestartEEStartEvents >= 1000 && GCRestartEEStopEvents >= 1000;
+                bool GCRestartEEStartStopResult = GCRestartEEStartEvents >= 50 && GCRestartEEStopEvents >= 50;
                 Logger.logger.Log("GCRestartEEStartStopResult check: " + GCRestartEEStartStopResult);
 
                 Logger.logger.Log("GCSuspendEEEvents: " + GCSuspendEEEvents);
                 Logger.logger.Log("GCSuspendEEEndEvents: " + GCSuspendEEEndEvents);
-                bool GCSuspendEEStartStopResult = GCSuspendEEEvents >= 1000 && GCSuspendEEEndEvents >= 1000;
+                bool GCSuspendEEStartStopResult = GCSuspendEEEvents >= 50 && GCSuspendEEEndEvents >= 50;
                 Logger.logger.Log("GCSuspendEEStartStopResult check: " + GCSuspendEEStartStopResult);
 
                 return GCStartStopResult && GCRestartEEStartStopResult && GCSuspendEEStartStopResult ? 100 : -1;
index 85b10d2..227e24e 100644 (file)
@@ -7,6 +7,8 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>1</CLRTestPriority>
     <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
+    <GCStressIncompatible>true</GCStressIncompatible>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="GCEvents.cs" />
index 656b593..256c0d7 100644 (file)
@@ -35,9 +35,9 @@ namespace Tracing.Tests.GCFinalizers
 
         private static Action _eventGeneratingAction = () => 
         {
-            for (int i = 0; i < 1000; i++)
+            for (int i = 0; i < 50; i++)
             {
-                if (i % 100 == 0)
+                if (i % 10 == 0)
                     Logger.logger.Log($"Called GC.WaitForPendingFinalizers() {i} times...");
                 ProviderValidation providerValidation = new ProviderValidation();
                 providerValidation = null;
@@ -58,7 +58,7 @@ namespace Tracing.Tests.GCFinalizers
                 Logger.logger.Log("Event counts validation");
                 Logger.logger.Log("GCFinalizersEndEvents: " + GCFinalizersEndEvents);
                 Logger.logger.Log("GCFinalizersStartEvents: " + GCFinalizersStartEvents);
-                return GCFinalizersEndEvents >= 1000 && GCFinalizersStartEvents >= 1000 ? 100 : -1;
+                return GCFinalizersEndEvents >= 50 && GCFinalizersStartEvents >= 50 ? 100 : -1;
             };
         };
     }
index 194a724..5938808 100644 (file)
@@ -7,6 +7,8 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>1</CLRTestPriority>
     <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
+    <GCStressIncompatible>true</GCStressIncompatible>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="GCFinalizers.cs" />
index af9f76f..e3f412d 100644 (file)
@@ -7,6 +7,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>0</CLRTestPriority>
     <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(MSBuildProjectName).cs" />
index ecf881c..214f067 100644 (file)
@@ -6,6 +6,7 @@
     <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLRTestPriority>0</CLRTestPriority>
+    <JitOptimizationSensitive>true</JitOptimizationSensitive>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(MSBuildProjectName).cs" />