diff options
author | Sean Gillespie <sean.william.g@gmail.com> | 2016-10-12 14:38:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-12 14:38:37 -0700 |
commit | 983e6cf9f3d06c9a5120ed2aeb382742948382ab (patch) | |
tree | 82bd69a013a2fcb404423e3d12be67d0675eea27 /tests | |
parent | 9bbf9e2a46e2b84ba3a87a202a3ea94d8ef58f05 (diff) | |
download | coreclr-983e6cf9f3d06c9a5120ed2aeb382742948382ab.tar.gz coreclr-983e6cf9f3d06c9a5120ed2aeb382742948382ab.tar.bz2 coreclr-983e6cf9f3d06c9a5120ed2aeb382742948382ab.zip |
Fail fast on a couple flaky tests to get crash dumps (#7588)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/GC/API/GCHandleCollector/Usage.cs | 3 | ||||
-rw-r--r-- | tests/src/GC/Scenarios/DoublinkList/dlcollect.cs | 6 | ||||
-rw-r--r-- | tests/src/GC/Scenarios/DoublinkList/dlstack.cs | 6 | ||||
-rw-r--r-- | tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs | 6 |
4 files changed, 20 insertions, 1 deletions
diff --git a/tests/src/GC/API/GCHandleCollector/Usage.cs b/tests/src/GC/API/GCHandleCollector/Usage.cs index 14088f03de..b78271b243 100644 --- a/tests/src/GC/API/GCHandleCollector/Usage.cs +++ b/tests/src/GC/API/GCHandleCollector/Usage.cs @@ -146,7 +146,8 @@ public class Usage // ensure threshold is increasing if (!CheckPercentageIncrease(handleCount, prevHandleCount)) { - Console.WriteLine("Case 3 failed: threshold not increasing!"); + // see github#4093 for the rationale for fail-fast in this test. + Environment.FailFast(string.Empty); return false; } prevHandleCount = handleCount; diff --git a/tests/src/GC/Scenarios/DoublinkList/dlcollect.cs b/tests/src/GC/Scenarios/DoublinkList/dlcollect.cs index a3a0c53dac..a17e95a270 100644 --- a/tests/src/GC/Scenarios/DoublinkList/dlcollect.cs +++ b/tests/src/GC/Scenarios/DoublinkList/dlcollect.cs @@ -77,6 +77,12 @@ namespace DoubLink { GC.WaitForPendingFinalizers(); + if (DLinkNode.FinalCount != iRep * iObj * 10) + { + // see github#4093 for the rationale for fail-fast in this test. + Environment.FailFast(string.Empty); + } + Console.WriteLine("{0} DLinkNodes finalized", DLinkNode.FinalCount); return (DLinkNode.FinalCount==iRep*iObj*10); } diff --git a/tests/src/GC/Scenarios/DoublinkList/dlstack.cs b/tests/src/GC/Scenarios/DoublinkList/dlstack.cs index 5aea9586c4..5e207bec52 100644 --- a/tests/src/GC/Scenarios/DoublinkList/dlstack.cs +++ b/tests/src/GC/Scenarios/DoublinkList/dlstack.cs @@ -85,6 +85,12 @@ namespace DoubLink { curTotalMemory = GC.GetTotalMemory(false); } + if (DLinkNode.FinalCount != iRep * iObj * 10) + { + // see github#4093 for the rationale for fail-fast in this test. + Environment.FailFast(string.Empty); + } + Console.WriteLine("{0} DLinkNodes finalized", DLinkNode.FinalCount); return (DLinkNode.FinalCount==iRep*iObj*10); diff --git a/tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs b/tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs index 9c5e4b6b04..76436ea7fe 100644 --- a/tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs +++ b/tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs @@ -71,6 +71,12 @@ namespace DoubLink { GC.WaitForPendingFinalizers(); GC.Collect(); + if (DLinkNode.FinalCount != iRep * iObj) + { + // see github#4093 for the rationale for fail-fast in this test. + Environment.FailFast(string.Empty); + } + Console.Write(DLinkNode.FinalCount); Console.WriteLine(" DLinkNodes finalized"); return (DLinkNode.FinalCount==iRep*iObj); |