<?xml version="1.0" ?>
<Project DefaultTargets = "GetListOfTestCmds" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="'$(XunitTestBinBase)' != ''">
- <ExcludeList Include="$(XunitTestBinBase)\GC\Scenarios\DoublinkList\doublinkgen\*">
- <Issue>6574</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)\GC\Coverage\271010\*">
<Issue>3392</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)\GC\Scenarios\muldimjagary\muldimjagary\*">
<Issue>3392</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)\GC\Scenarios\DoublinkList\dlstack\*">
- <Issue>6553</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)\JIT\Directed\coverage\importer\Desktop\ldelemnullarr1_il_d\ldelemnullarr1_il_d.cmd">
<Issue>4851</Issue>
</ExcludeList>
// ensure threshold is increasing
if (!CheckPercentageIncrease(handleCount, prevHandleCount))
{
- // see github#4093 for the rationale for fail-fast in this test.
- Environment.FailFast(string.Empty);
- return false;
+ Console.WriteLine("Percentage not increasing, performing Collect/WFPF/Collect cycle");
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (handleCount == HandleCollectorTest.Count)
+ {
+ Console.WriteLine("No handles finalized in Collect/WFPF/Collect cycle");
+ return false;
+ }
}
prevHandleCount = handleCount;
}
namespace DoubLink {
using System;
using System.Collections.Generic;
+ using System.Runtime.CompilerServices;
public class DLCollect
{
}
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public bool DrainFinalizerQueue(int iRep, int iObj)
+ {
+ int lastValue = DLinkNode.FinalCount;
+ while (true)
+ {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (DLinkNode.FinalCount == iRep * iObj * 10)
+ {
+ return true;
+ }
+
+ if (DLinkNode.FinalCount != lastValue)
+ {
+ Console.WriteLine(" Performing Collect/Wait/Collect cycle again");
+ lastValue = DLinkNode.FinalCount;
+ continue;
+ }
+
+ Console.WriteLine(" Finalized number stable at " + lastValue);
+ return false;
+ }
+ }
public bool runTest(int iRep, int iObj)
{
Mv_Collect = new List<DoubLink>(iRep);
+ bool success = false;
for(int i=0; i <10; i++)
{
SetLink(iRep, iObj);
GC.Collect();
}
- GC.WaitForPendingFinalizers();
-
- if (DLinkNode.FinalCount != iRep * iObj * 10)
+ if (DrainFinalizerQueue(iRep, iObj))
{
- // see github#4093 for the rationale for fail-fast in this test.
- Environment.FailFast(string.Empty);
+ success = true;
}
Console.WriteLine("{0} DLinkNodes finalized", DLinkNode.FinalCount);
- return (DLinkNode.FinalCount==iRep*iObj*10);
+ return success;
}
namespace DoubLink {
using System;
+ using System.Runtime.CompilerServices;
public class DLStack
{
}
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public bool DrainFinalizerQueue(int iRep, int iObj)
+ {
+ int lastValue = DLinkNode.FinalCount;
+ while (true)
+ {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (DLinkNode.FinalCount == iRep * iObj * 10)
+ {
+ return true;
+ }
+
+ if (DLinkNode.FinalCount != lastValue)
+ {
+ Console.WriteLine(" Performing Collect/Wait/Collect cycle again");
+ lastValue = DLinkNode.FinalCount;
+ continue;
+ }
+
+ Console.WriteLine(" Finalized number stable at " + lastValue);
+ return false;
+ }
+ }
+
public bool runTest(int iRep, int iObj)
{
-
+ bool success = false;
for(int i=0; i <10; i++)
{
SetLink(iRep, iObj);
MakeLeak(iRep);
}
- long lastTotalMemory = long.MaxValue;
- long curTotalMemory = GC.GetTotalMemory(false);
-
- while (lastTotalMemory != curTotalMemory)
- {
- GC.Collect();
- GC.WaitForPendingFinalizers();
-
- lastTotalMemory = curTotalMemory;
- curTotalMemory = GC.GetTotalMemory(false);
- }
-
- if (DLinkNode.FinalCount != iRep * iObj * 10)
+ if (DrainFinalizerQueue(iRep, iObj))
{
- // see github#4093 for the rationale for fail-fast in this test.
- Environment.FailFast(string.Empty);
+ success = true;
}
Console.WriteLine("{0} DLinkNodes finalized", DLinkNode.FinalCount);
- return (DLinkNode.FinalCount==iRep*iObj*10);
+ return success;
}
namespace DoubLink {
using System;
+ using System.Runtime.CompilerServices;
public class DoubLinkGen
{
return 1;
}
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public bool DrainFinalizerQueue(int iRep, int iObj)
+ {
+ int lastValue = DLinkNode.FinalCount;
+ while (true)
+ {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ GC.Collect();
+
+ if (DLinkNode.FinalCount == iRep * iObj)
+ {
+ return true;
+ }
+
+ if (DLinkNode.FinalCount != lastValue)
+ {
+ Console.WriteLine(" Performing Collect/Wait/Collect cycle again");
+ lastValue = DLinkNode.FinalCount;
+ continue;
+ }
+
+ Console.WriteLine(" Finalized number stable at " + lastValue);
+ return false;
+ }
+ }
public bool runTest(int iRep, int iObj)
{
SetLink(iRep, iObj);
Mv_Doub = null;
+ bool success = false;
- GC.Collect();
- GC.WaitForPendingFinalizers();
- GC.Collect();
-
- if (DLinkNode.FinalCount != iRep * iObj)
+ if (DrainFinalizerQueue(iRep, iObj))
{
- // see github#4093 for the rationale for fail-fast in this test.
- Environment.FailFast(string.Empty);
+ success = true;
}
Console.Write(DLinkNode.FinalCount);
Console.WriteLine(" DLinkNodes finalized");
- return (DLinkNode.FinalCount==iRep*iObj);
+ return success;
}
GC/Features/LOHFragmentation/lohfragmentation/lohfragmentation.sh
GC/Features/SustainedLowLatency/scenario/scenario.sh
GC/Regressions/dev10bugs/536168/536168/536168.sh
-GC/Scenarios/DoublinkList/doublinkgen/doublinkgen.sh
Loader/classloader/TypeGeneratorTests/TypeGeneratorTest612/Generated612/Generated612.sh
Loader/classloader/TypeGeneratorTests/TypeGeneratorTest613/Generated613/Generated613.sh
Loader/classloader/TypeGeneratorTests/TypeGeneratorTest614/Generated614/Generated614.sh