Skip to content

Commit

Permalink
Add/delete tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion committed Nov 29, 2021
1 parent 6708fd9 commit 010dec1
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 3,450 deletions.
3,313 changes: 0 additions & 3,313 deletions src/tests/JIT/Directed/tls/MutualRecurThd-TLS.il

This file was deleted.

21 changes: 0 additions & 21 deletions src/tests/JIT/Directed/tls/Test-TLS.il

This file was deleted.

34 changes: 34 additions & 0 deletions src/tests/JIT/Directed/tls/TlsStaticsAreNotSupported.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Reflection;

class TlsStaticsAreNotSupported
{
public static int Main()
{
if (typeof(TlsStaticsAreNotSupported).Assembly.Location is "")
{
Console.WriteLine("Skipping the test: Assembly.Location returned empty string, assuming dynamic loading is problematic");
return 100;
}

Exception exception = null;
try
{
Assembly.LoadFrom("data-tls.dll");
}
catch (System.BadImageFormatException e)
{
return 100;
}
catch (Exception e)
{
exception = e;
}

Console.WriteLine($"Expected: BadImageFormatException, actual: {exception?.GetType().ToString() ?? "none"}");
return 101;
}
}
16 changes: 16 additions & 0 deletions src/tests/JIT/Directed/tls/TlsStaticsAreNotSupported.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="data-tls.ilproj" />
</ItemGroup>
</Project>
20 changes: 20 additions & 0 deletions src/tests/JIT/Directed/tls/data-tls.il
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

.assembly extern System.Runtime { auto }
.assembly DataTls
{
}

.data tls FieldData = int32(51966)

.class public ClassWithTlsStatic extends [System.Runtime]System.Object
{
.field public static int32 TLSFieldData at FieldData
.method public static int32 GetTlsStaticValue()
{
ldsfld int32 ClassWithTlsStatic::TLSFieldData
ldc.i4 100
ret
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.IL">
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestPriority>1</CLRTestPriority>
<!-- Test relies on tls support see #2441 -->
<DisableProjectBuild>true</DisableProjectBuild>
<OutputType>Library</OutputType>
<CLRTestKind>BuildOnly</CLRTestKind>
</PropertyGroup>
<PropertyGroup>
<DebugType>PdbOnly</DebugType>
Expand Down
15 changes: 0 additions & 15 deletions src/tests/JIT/Directed/tls/mutualrecurthd-tls.ilproj

This file was deleted.

15 changes: 0 additions & 15 deletions src/tests/JIT/Directed/tls/test-tls.ilproj

This file was deleted.

46 changes: 0 additions & 46 deletions src/tests/JIT/Regression/CLR-x86-EJIT/v1-m10/b07847/b07847.il

This file was deleted.

15 changes: 0 additions & 15 deletions src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/b03689.ilproj

This file was deleted.

21 changes: 0 additions & 21 deletions src/tests/JIT/Regression/CLR-x86-JIT/V1.2-M01/b03689/test-tls.il

This file was deleted.

0 comments on commit 010dec1

Please sign in to comment.