summaryrefslogtreecommitdiff
path: root/tests/src/GC
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/GC')
-rw-r--r--tests/src/GC/API/GC/GetGenerationWR2.csproj1
-rw-r--r--tests/src/GC/API/GCHandleCollector/Usage.cs3
-rw-r--r--tests/src/GC/Features/HeapExpansion/pluggaps.csproj1
-rw-r--r--tests/src/GC/Performance/Framework/GCPerfTestFramework.csproj31
-rw-r--r--tests/src/GC/Performance/Framework/packages.config24
-rw-r--r--tests/src/GC/Regressions/v2.0-rtm/494226/494226.csproj3
-rw-r--r--tests/src/GC/Scenarios/DoublinkList/dlcollect.cs6
-rw-r--r--tests/src/GC/Scenarios/DoublinkList/dlstack.cs6
-rw-r--r--tests/src/GC/Scenarios/DoublinkList/doublinkgen.cs6
-rw-r--r--tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs7
-rw-r--r--tests/src/GC/Scenarios/ServerModel/servermodel.csproj1
-rw-r--r--tests/src/GC/Stress/Framework/ReliabilityFramework.csproj2
-rw-r--r--tests/src/GC/Stress/Tests/dir.targets6
13 files changed, 66 insertions, 31 deletions
diff --git a/tests/src/GC/API/GC/GetGenerationWR2.csproj b/tests/src/GC/API/GC/GetGenerationWR2.csproj
index 35a05a68bf..6b109e9c8c 100644
--- a/tests/src/GC/API/GC/GetGenerationWR2.csproj
+++ b/tests/src/GC/API/GC/GetGenerationWR2.csproj
@@ -13,6 +13,7 @@
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages</ReferencePath>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <GCStressIncompatible Condition="'$(Platform)' == 'x86'">true</GCStressIncompatible>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<CLRTestExecutionArguments></CLRTestExecutionArguments>
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/Features/HeapExpansion/pluggaps.csproj b/tests/src/GC/Features/HeapExpansion/pluggaps.csproj
index cbeab565fe..42ba45a58f 100644
--- a/tests/src/GC/Features/HeapExpansion/pluggaps.csproj
+++ b/tests/src/GC/Features/HeapExpansion/pluggaps.csproj
@@ -14,6 +14,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<GCStressIncompatible>true</GCStressIncompatible>
+ <HeapVerifyIncompatible Condition="'$(Platform)' == 'x86'">true</HeapVerifyIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
diff --git a/tests/src/GC/Performance/Framework/GCPerfTestFramework.csproj b/tests/src/GC/Performance/Framework/GCPerfTestFramework.csproj
index cc8261f26e..d013349cc9 100644
--- a/tests/src/GC/Performance/Framework/GCPerfTestFramework.csproj
+++ b/tests/src/GC/Performance/Framework/GCPerfTestFramework.csproj
@@ -35,11 +35,12 @@
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=1.0.39.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.39\lib\net40\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
+ <Reference Include="Microsoft.Diagnostics.Tracing.TraceEvent, Version=1.0.41.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+ <HintPath>packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\lib\net40\Microsoft.Diagnostics.Tracing.TraceEvent.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
+ <Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.IO.FileSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.IO.FileSystem.4.0.0\lib\net46\System.IO.FileSystem.dll</HintPath>
@@ -56,27 +57,27 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0030\lib\net46\xunit.abstractions.dll</HintPath>
+ <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0040\lib\net46\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="xunit.core, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <HintPath>packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll</HintPath>
+ <Reference Include="xunit.core, Version=2.2.0.3300, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
+ <HintPath>packages\xunit.extensibility.core.2.2.0-beta2-build3300\lib\netstandard1.0\xunit.core.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="xunit.execution.desktop, Version=2.1.0.3179, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
- <HintPath>packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll</HintPath>
+ <Reference Include="xunit.execution.desktop, Version=2.2.0.3300, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
+ <HintPath>packages\xunit.extensibility.execution.2.2.0-beta2-build3300\lib\net45\xunit.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="xunit.performance.core, Version=1.0.0.30, Culture=neutral, PublicKeyToken=67066efe964d3b03, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0030\lib\net46\xunit.performance.core.dll</HintPath>
+ <Reference Include="xunit.performance.core, Version=1.0.0.40, Culture=neutral, PublicKeyToken=67066efe964d3b03, processorArchitecture=MSIL">
+ <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0040\lib\net46\xunit.performance.core.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="xunit.performance.execution.desktop, Version=1.0.0.30, Culture=neutral, PublicKeyToken=67066efe964d3b03, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.DotNet.xunit.performance.1.0.0-alpha-build0030\lib\net46\xunit.performance.execution.desktop.dll</HintPath>
+ <Reference Include="xunit.performance.execution.desktop, Version=1.0.0.40, Culture=neutral, PublicKeyToken=67066efe964d3b03, processorArchitecture=MSIL">
+ <HintPath>packages\Microsoft.DotNet.xunit.performance.1.0.0-alpha-build0040\lib\net46\xunit.performance.execution.desktop.dll</HintPath>
<Private>True</Private>
</Reference>
- <Reference Include="xunit.performance.metrics, Version=1.0.0.30, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0030\lib\net46\xunit.performance.metrics.dll</HintPath>
+ <Reference Include="xunit.performance.metrics, Version=1.0.0.40, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>packages\Microsoft.DotNet.xunit.performance.metrics.1.0.0-alpha-build0040\lib\net46\xunit.performance.metrics.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
@@ -102,12 +103,12 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.39\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets" Condition="Exists('packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.39\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" />
+ <Import Project="packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets" Condition="Exists('packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
- <Error Condition="!Exists('packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.39\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.39\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets'))" />
+ <Error Condition="!Exists('packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\build\Microsoft.Diagnostics.Tracing.TraceEvent.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/tests/src/GC/Performance/Framework/packages.config b/tests/src/GC/Performance/Framework/packages.config
index 16572761b4..c43e175825 100644
--- a/tests/src/GC/Performance/Framework/packages.config
+++ b/tests/src/GC/Performance/Framework/packages.config
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="1.0.39" targetFramework="net461" />
- <package id="Microsoft.DotNet.xunit.performance" version="1.0.0-alpha-build0030" targetFramework="net461" />
- <package id="Microsoft.DotNet.xunit.performance.metrics" version="1.0.0-alpha-build0030" targetFramework="net461" />
+ <package id="Microsoft.Diagnostics.Tracing.TraceEvent" version="1.0.41" targetFramework="net461" />
+ <package id="Microsoft.DotNet.xunit.performance" version="1.0.0-alpha-build0040" targetFramework="net461" />
+ <package id="Microsoft.DotNet.xunit.performance.metrics" version="1.0.0-alpha-build0040" targetFramework="net461" />
<package id="System.Collections" version="4.0.10" targetFramework="net461" />
<package id="System.Diagnostics.Debug" version="4.0.10" targetFramework="net461" />
- <package id="System.Diagnostics.Tracing" version="4.0.20" targetFramework="net461" />
+ <package id="System.Diagnostics.Tracing" version="4.1.0" targetFramework="net461" />
<package id="System.Globalization" version="4.0.10" targetFramework="net461" />
- <package id="System.IO" version="4.0.10" targetFramework="net461" />
+ <package id="System.IO" version="4.1.0" targetFramework="net461" />
<package id="System.IO.FileSystem" version="4.0.0" targetFramework="net461" />
<package id="System.IO.FileSystem.Primitives" version="4.0.0" targetFramework="net461" />
- <package id="System.Linq" version="4.0.0" targetFramework="net461" />
- <package id="System.Reflection" version="4.0.10" targetFramework="net461" />
- <package id="System.Runtime" version="4.0.20" targetFramework="net461" />
- <package id="System.Runtime.Extensions" version="4.0.10" targetFramework="net461" />
+ <package id="System.Linq" version="4.1.0" targetFramework="net461" />
+ <package id="System.Reflection" version="4.1.0" targetFramework="net461" />
+ <package id="System.Runtime" version="4.1.0" targetFramework="net461" />
+ <package id="System.Runtime.Extensions" version="4.1.0" targetFramework="net461" />
<package id="System.Runtime.Handles" version="4.0.0" targetFramework="net461" />
<package id="System.Text.Encoding" version="4.0.10" targetFramework="net461" />
<package id="System.Threading" version="4.0.10" targetFramework="net461" />
<package id="System.Threading.Tasks" version="4.0.10" targetFramework="net461" />
- <package id="xunit.abstractions" version="2.0.0" targetFramework="net461" />
- <package id="xunit.extensibility.core" version="2.1.0" targetFramework="net461" />
- <package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net461" />
+ <package id="xunit.abstractions" version="2.0.1-rc2" targetFramework="net461" />
+ <package id="xunit.extensibility.core" version="2.2.0-beta2-build3300" targetFramework="net461" />
+ <package id="xunit.extensibility.execution" version="2.2.0-beta2-build3300" targetFramework="net461" />
</packages> \ No newline at end of file
diff --git a/tests/src/GC/Regressions/v2.0-rtm/494226/494226.csproj b/tests/src/GC/Regressions/v2.0-rtm/494226/494226.csproj
index 99623f4563..fe23500677 100644
--- a/tests/src/GC/Regressions/v2.0-rtm/494226/494226.csproj
+++ b/tests/src/GC/Regressions/v2.0-rtm/494226/494226.csproj
@@ -14,6 +14,7 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<GCStressIncompatible>true</GCStressIncompatible>
+ <HeapVerifyIncompatible Condition="'$(Platform)' == 'x86'">true</HeapVerifyIncompatible>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
@@ -36,4 +37,4 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
</PropertyGroup>
-</Project> \ No newline at end of file
+</Project>
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);
diff --git a/tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs b/tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs
index 0fda8172e4..60a6861734 100644
--- a/tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs
+++ b/tests/src/GC/Scenarios/FinalizeTimeout/FinalizeTimeout.cs
@@ -17,6 +17,7 @@ public class FinalizeTimeout
do
{
finalizableObject = new BlockingFinalizerOnShutdown();
+ GC.KeepAlive(finalizableObject);
} while (!BlockingFinalizerOnShutdown.finalizerCompletedOnce);
// Start a bunch of threads that allocate continuously, to increase the chance that when Main returns, one of the
@@ -42,12 +43,15 @@ public class FinalizeTimeout
{
byte[] b;
while (true)
+ {
b = new byte[1024];
+ GC.KeepAlive(b);
+ }
}
private class BlockingFinalizerOnShutdown
{
- public static bool finalizerCompletedOnce = false;
+ public volatile static bool finalizerCompletedOnce = false;
public bool isLastObject = false;
~BlockingFinalizerOnShutdown()
@@ -68,6 +72,7 @@ public class FinalizeTimeout
do
{
o = new object();
+ GC.KeepAlive(o);
} while ((++i & 0xff) != 0 || (elapsed = DateTime.Now - start) < timeout);
Console.WriteLine("Finalizer end");
diff --git a/tests/src/GC/Scenarios/ServerModel/servermodel.csproj b/tests/src/GC/Scenarios/ServerModel/servermodel.csproj
index 33fc4efbc8..dff52fc6ad 100644
--- a/tests/src/GC/Scenarios/ServerModel/servermodel.csproj
+++ b/tests/src/GC/Scenarios/ServerModel/servermodel.csproj
@@ -15,6 +15,7 @@
<NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
<CLRTestExecutionArguments>/numrequests:100</CLRTestExecutionArguments>
<GCStressIncompatible>true</GCStressIncompatible>
+ <HeapVerifyIncompatible Condition="'$(Platform)' == 'x86'">true</HeapVerifyIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj
index 9288e52ffe..9dd878b8db 100644
--- a/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj
+++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.csproj
@@ -52,6 +52,6 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<Target Name="AfterBuild">
- <MSBuild Projects="@(StressTests)" Properties="OutputPath=$(OutDir)\Tests" />
+ <MSBuild Projects="@(StressTests)" Properties="OutputPath=$(OutDir)\Tests;BuildingForReliabilityFramework=true" />
</Target>
</Project>
diff --git a/tests/src/GC/Stress/Tests/dir.targets b/tests/src/GC/Stress/Tests/dir.targets
new file mode 100644
index 0000000000..d4f8bf9251
--- /dev/null
+++ b/tests/src/GC/Stress/Tests/dir.targets
@@ -0,0 +1,6 @@
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <DisableProjectBuild Condition="'$(BuildingForReliabilityFramework)' != 'true'">true</DisableProjectBuild>
+ </PropertyGroup>
+ <Import Project="..\..\..\dir.targets" />
+</Project> \ No newline at end of file