From 34d0fdb5a32a979fdf347497cde43127a874dac1 Mon Sep 17 00:00:00 2001 From: Andi McClure Date: Wed, 1 Jun 2016 18:04:35 -0400 Subject: [PATCH] Halve the stack depth for both the new single step tests --- .../Mono.Debugger.Soft/Test/dtest-app.cs | 6 ++--- mcs/class/Mono.Debugger.Soft/Test/dtest.cs | 22 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index e86615c1c30..4b9d569b1ad 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -587,7 +587,7 @@ public class Tests : TestsBase, ITest2 public static void ss_recursive2 (int x) { ss_recursive2_at ( "ss_recursive2 in " + x); - if (x < 10) { + if (x < 5) { int next = x + 1; ss_recursive2_at ("ss_recursive2 descend " + x); ss_recursive2_trap (); @@ -606,7 +606,7 @@ public class Tests : TestsBase, ITest2 public static void ss_recursive_chaotic_at (bool exiting, string at, int n) { // string indent = ""; -// for (int count = 12 - n; count > 0; count--) +// for (int count = 5 - n; count > 0; count--) // indent += "\t"; // Console.WriteLine (indent + (exiting ? "<--" : "-->") + " " + at + " " + n); } @@ -654,7 +654,7 @@ public class Tests : TestsBase, ITest2 [MethodImplAttribute (MethodImplOptions.NoInlining)] public static void ss_recursive_chaotic () { - ss_recursive_chaotic_fizz (12); + ss_recursive_chaotic_fizz (5); } [MethodImplAttribute (MethodImplOptions.NoInlining)] diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs index 81f91de103c..c07ad14848e 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs @@ -203,8 +203,8 @@ public class DebuggerTests public static void ss_recursive_chaotic_trap (int n, List trace, ref bool didLast, ref bool didAny) { // Depth is calculated as: - // Main + single_stepping + ss_recursive_chaotic + (n is 12 at outermost frame and 0 at innermost frame) + ss_recursive_chaotic_trap - trace.Add (new RecursiveChaoticPoint (true, "ss_recursive_chaotic_trap", 12 - n + 5)); + // Main + single_stepping + ss_recursive_chaotic + (n is 5 at outermost frame and 0 at innermost frame) + ss_recursive_chaotic_trap + trace.Add (new RecursiveChaoticPoint (true, "ss_recursive_chaotic_trap", 5 - n + 5)); didLast = true; } @@ -213,8 +213,8 @@ public class DebuggerTests // This will be called after every return from a function. The other function will return whether "step out" is currently active, and it will be passed in here as didLast. if (didLast) { // Depth is calculated as: - // Main + single_stepping + ss_recursive_chaotic + (n is 12 at outermost frame and 0 at innermost frame) - trace.Add (new RecursiveChaoticPoint (false, "ss_recursive_chaotic_" + at, 12 - n + 4)); + // Main + single_stepping + ss_recursive_chaotic + (n is 5 at outermost frame and 0 at innermost frame) + trace.Add (new RecursiveChaoticPoint (false, "ss_recursive_chaotic_" + at, 5 - n + 4)); didAny = true; didLast = false; } @@ -266,7 +266,7 @@ public class DebuggerTests public static void trace_ss_recursive_chaotic (List trace) { - ss_recursive_chaotic_fizz (12, trace); + ss_recursive_chaotic_fizz (5, trace); } Event single_step (ThreadMirror t) { @@ -793,8 +793,8 @@ public class DebuggerTests breakpoint.Continue (); e = breakpoint.lastEvent; req = create_step (e); - for (int c = 1; c <= 9; c++) { - // The first ten times we try to step over this function, the breakpoint will stop us + for (int c = 1; c <= 4; c++) { + // The first five times we try to step over this function, the breakpoint will stop us assert_location_at_breakpoint (e, "ss_recursive2_trap"); req.Disable (); @@ -810,7 +810,7 @@ public class DebuggerTests } // At this point we should have escaped the breakpoints and this will be a normal step stop assert_location (e, "ss_recursive2"); - Assert.AreEqual (11, e.Thread.GetFrames ().Length); + Assert.AreEqual (6, e.Thread.GetFrames ().Length); } finally { req.Disable (); breakpoint.Disable (); @@ -823,8 +823,8 @@ public class DebuggerTests breakpoint.Continue (); e = breakpoint.lastEvent; req = create_step (e); - for (int c = 1; c <= 9; c++) { - // The first ten times we try to step over this function, the breakpoint will stop us + for (int c = 1; c <= 4; c++) { + // The first five times we try to step over this function, the breakpoint will stop us assert_location_at_breakpoint (e, "ss_recursive2_trap"); req.Disable (); @@ -838,7 +838,7 @@ public class DebuggerTests Assert.AreEqual (c+2, e.Thread.GetFrames ().Length); e = step_out_or_breakpoint (); } - for (int c = 8; c >= 1; c--) { + for (int c = 3; c >= 1; c--) { assert_location (e, "ss_recursive2"); Assert.AreEqual (c + 2, e.Thread.GetFrames ().Length); -- 2.25.1