diff options
-rw-r--r-- | tests/arm/Tests.lst | 2 | ||||
-rw-r--r-- | tests/src/GC/Scenarios/DoublinkList/dlstack.cs | 21 |
2 files changed, 16 insertions, 7 deletions
diff --git a/tests/arm/Tests.lst b/tests/arm/Tests.lst index eb7fab589c..407ab2cd7d 100644 --- a/tests/arm/Tests.lst +++ b/tests/arm/Tests.lst @@ -881,7 +881,7 @@ RelativePath=GC\Scenarios\DoublinkList\dlstack\dlstack.cmd WorkingDir=GC\Scenarios\DoublinkList\dlstack Expected=0 MaxAllowedDurationSeconds=600 -Categories=EXPECTED_PASS;JITSTRESS_FAIL;15156 +Categories=EXPECTED_PASS HostStyle=0 [Generated1222.cmd_112] diff --git a/tests/src/GC/Scenarios/DoublinkList/dlstack.cs b/tests/src/GC/Scenarios/DoublinkList/dlstack.cs index 8fa63bf8fd..585c6a2670 100644 --- a/tests/src/GC/Scenarios/DoublinkList/dlstack.cs +++ b/tests/src/GC/Scenarios/DoublinkList/dlstack.cs @@ -94,13 +94,9 @@ namespace DoubLink { public bool runTest(int iRep, int iObj) { - bool success = false; - for(int i=0; i <10; i++) - { - SetLink(iRep, iObj); - MakeLeak(iRep); - } + CreateDLinkListsWithLeak(iRep, iObj); + bool success = false; if (DrainFinalizerQueue(iRep, iObj)) { success = true; @@ -112,6 +108,19 @@ namespace DoubLink { } + [MethodImpl(MethodImplOptions.NoInlining)] + // Do not inline the method that creates GC objects, because it could + // extend their live intervals until the end of the parent method. + public void CreateDLinkListsWithLeak(int iRep, int iObj) + { + for(int i=0; i <10; i++) + { + SetLink(iRep, iObj); + MakeLeak(iRep); + } + } + + public void SetLink(int iRep, int iObj) { DLinkNode[] Mv_DLink; |