summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndy Ayers <andya@microsoft.com>2019-02-25 15:50:03 -0800
committerGitHub <noreply@github.com>2019-02-25 15:50:03 -0800
commit268a6b777febf10e97badede96dcddd54b54c4e1 (patch)
treebb7a4c5f2809f098521e9c50510e92c0286be8cf /tests
parentea5971a6fe1672f0334c9530d68e8621a9877128 (diff)
downloadcoreclr-268a6b777febf10e97badede96dcddd54b54c4e1.tar.gz
coreclr-268a6b777febf10e97badede96dcddd54b54c4e1.tar.bz2
coreclr-268a6b777febf10e97badede96dcddd54b54c4e1.zip
Fix and re-enable some finalizer tests (#22771)
Mark key allocating methods noinline, otherwise they may get inlined under jit stress and leave jit temps referring to allocations that the test expects should be collectible. Resolves #19218.
Diffstat (limited to 'tests')
-rw-r--r--tests/issues.targets6
-rw-r--r--tests/src/GC/Features/Finalizer/finalizeother/finalizearray.cs2
-rw-r--r--tests/src/GC/Features/Finalizer/finalizeother/finalizearraysleep.cs2
-rw-r--r--tests/src/GC/Features/Finalizer/finalizeother/finalizedest.cs2
-rw-r--r--tests/src/GC/Features/Finalizer/finalizeother/finalizeexcep.cs2
-rw-r--r--tests/src/GC/Features/Finalizer/finalizeother/finalizeinherit.cs2
6 files changed, 10 insertions, 6 deletions
diff --git a/tests/issues.targets b/tests/issues.targets
index b56b85ccc0..e72ea7d39a 100644
--- a/tests/issues.targets
+++ b/tests/issues.targets
@@ -115,12 +115,6 @@
<ExcludeList Include="$(XunitTestBinBase)/GC/Features/HeapExpansion/pluggaps/*">
<Issue>needs triage</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/GC/Features/Finalizer/finalizeother/finalizearray/*">
- <Issue>19218</Issue>
- </ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/GC/Features/Finalizer/finalizeother/finalizearraysleep/*">
- <Issue>19218</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/GC/Regressions/v2.0-beta2/460373/460373/*">
<Issue>needs triage</Issue>
</ExcludeList>
diff --git a/tests/src/GC/Features/Finalizer/finalizeother/finalizearray.cs b/tests/src/GC/Features/Finalizer/finalizeother/finalizearray.cs
index 7b540c4e5b..ef76dd7adf 100644
--- a/tests/src/GC/Features/Finalizer/finalizeother/finalizearray.cs
+++ b/tests/src/GC/Features/Finalizer/finalizeother/finalizearray.cs
@@ -22,6 +22,8 @@ public class Test
{
public Dummy[] obj;
+ // No inline to ensure no stray refs to the new array
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public CreateObj() {
obj = new Dummy[10000];
for(int i=0;i<10000;i++) {
diff --git a/tests/src/GC/Features/Finalizer/finalizeother/finalizearraysleep.cs b/tests/src/GC/Features/Finalizer/finalizeother/finalizearraysleep.cs
index 80a8ed225d..bf6cba9021 100644
--- a/tests/src/GC/Features/Finalizer/finalizeother/finalizearraysleep.cs
+++ b/tests/src/GC/Features/Finalizer/finalizeother/finalizearraysleep.cs
@@ -22,6 +22,8 @@ public class Test {
public Dummy[] obj;
public int ExitCode = 0;
+ // No inline to ensure no stray refs to the new array
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public CreateObj() {
obj = new Dummy[10];
diff --git a/tests/src/GC/Features/Finalizer/finalizeother/finalizedest.cs b/tests/src/GC/Features/Finalizer/finalizeother/finalizedest.cs
index a736ff9708..cf132a0558 100644
--- a/tests/src/GC/Features/Finalizer/finalizeother/finalizedest.cs
+++ b/tests/src/GC/Features/Finalizer/finalizeother/finalizedest.cs
@@ -29,6 +29,8 @@ public class Test
Dummy obj;
#pragma warning restore 0414
+ // No inline to ensure no stray refs to the Dummy object
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public CreateObj()
{
obj = new Dummy();
diff --git a/tests/src/GC/Features/Finalizer/finalizeother/finalizeexcep.cs b/tests/src/GC/Features/Finalizer/finalizeother/finalizeexcep.cs
index eed1395f6a..c680b0df48 100644
--- a/tests/src/GC/Features/Finalizer/finalizeother/finalizeexcep.cs
+++ b/tests/src/GC/Features/Finalizer/finalizeother/finalizeexcep.cs
@@ -32,6 +32,8 @@ public class Test {
public class CreateObj {
public Dummy obj;
+ // No inline to ensure no stray refs to the Dummy object
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public CreateObj() {
obj = new Dummy();
}
diff --git a/tests/src/GC/Features/Finalizer/finalizeother/finalizeinherit.cs b/tests/src/GC/Features/Finalizer/finalizeother/finalizeinherit.cs
index c24f0bedbd..533f7527ee 100644
--- a/tests/src/GC/Features/Finalizer/finalizeother/finalizeinherit.cs
+++ b/tests/src/GC/Features/Finalizer/finalizeother/finalizeinherit.cs
@@ -55,6 +55,8 @@ namespace Three {
#pragma warning restore 0414
C c;
+ // No inline to ensure no stray refs to the B, C, D objects.
+ [MethodImplAttribute(MethodImplOptions.NoInlining)]
public CreateObj()
{
b = new B();