{
GC.Collect();
GC.WaitForPendingFinalizers();
+ Thread.Sleep(10);
}
if (_input.BreakAfterRun)
private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
+ Console.WriteLine($"RunInContext FAIL! Exiting due to unhandled exception in the test: {e.ExceptionObject}");
Environment.Exit(FailureExitCode);
}
# 3. - n. Additional arguments that were passed to the test .sh
export CORE_LIBRARIES=$1
-$_DebuggerFullPath "$CORE_ROOT/corerun" "$CORE_ROOT/runincontext.dll" $RunInContextExtraArgs /referencespath:$CORE_ROOT/ $1$2 $3 $4 $5 $6 $7 $8 $9
+$_DebuggerFullPath "$CORE_ROOT/corerun" "$CORE_ROOT/runincontext.dll" $RunInContextExtraArgs /referencespath:$CORE_ROOT/ $1$2 "${@:3}"
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<GCStressIncompatible>true</GCStressIncompatible>
<CLRTestPriority>1</CLRTestPriority>
+ <!-- This test tries to print to console from a finalizer after the static with stdout SafeHandle is finalized -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "></PropertyGroup>
<!-- Test unsupported outside of windows -->
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
<DisableProjectBuild Condition="'$(TargetsWindows)' != 'true'">true</DisableProjectBuild>
+ <!-- The test fails casting from ClassFromA from the default ALC to type IGetTypeFromC from a custom ALC -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Interop.settings.targets))\Interop.settings.targets" />
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
<DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
<DisableProjectBuild Condition="'$(Platform)' == 'arm' or '$(Platform)' == 'arm64'">true</DisableProjectBuild>
+ <!-- WinRT interop is not compatible with unloadability -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<!-- Test unsupported outside of windows -->
<TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
<DisableProjectBuild Condition="'$(TargetsUnix)' == 'true'">true</DisableProjectBuild>
- </PropertyGroup>
+ <!-- WinRT interop is not compatible with unloadability -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
</PropertyGroup>
<OutputType>Exe</OutputType>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <!-- The test uses non-unloadable AssemblyLoadContext -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputType>Exe</OutputType>
<CLRTestKind>BuildAndRun</CLRTestKind>
<ProjectGuid>{78030DC5-F1A6-4B98-A130-A66F5047FF29}</ProjectGuid>
+ <!-- The test uses AssemblyLoadContext (directly) to load the test assembly and its dependency that's part of the test again.
+ When the test is loaded into an unloadable context in the runincontext tool, the dependency assembly cannot be found
+ since it is in a different folder than the runincontext tool. -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="ContextualReflection.cs" />
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestPriority>1</CLRTestPriority>
+ <!-- The test can have threads running at exit -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestPriority>1</CLRTestPriority>
- </PropertyGroup>
+ <!-- This test leaves secondary threads running at exit -->
+ <UnloadabilityIncompatible>true</UnloadabilityIncompatible>
+</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
</PropertyGroup>