Adjust expected file size if ZapDisable is true (#16240)
authorVictor "Nate" Graf <nategraf1@gmail.com>
Thu, 8 Feb 2018 23:07:20 +0000 (15:07 -0800)
committerGitHub <noreply@github.com>
Thu, 8 Feb 2018 23:07:20 +0000 (15:07 -0800)
tests/src/tracing/eventpipesmoke/EventPipeSmoke.cs

index 2fa8786..a7b67fb 100644 (file)
@@ -7,7 +7,8 @@ namespace Tracing.Tests
     class EventPipeSmoke
     {
         private static int allocIterations = 10000;
-        private static int trivialSize = 0x100000;
+        private static bool zapDisabled = Int32.Parse(Environment.GetEnvironmentVariable("COMPlus_ZapDisable") ?? "0") > 0;
+        private static int trivialSize = zapDisabled ? 64 * 1024 : 1 * 1024 * 1024;
 
         static int Main(string[] args)
         {
@@ -39,6 +40,7 @@ namespace Tracing.Tests
             Console.WriteLine("\tEnd: Disable tracing.\n");
 
             FileInfo outputMeta = new FileInfo(outputFilename);
+            Console.WriteLine("\tExpecting at least {0} bytes of data", trivialSize);
             Console.WriteLine("\tCreated {0} bytes of data", outputMeta.Length);
 
             bool pass = false;