Skip to content

Commit 42f0c49

Browse files
kouvelstephentoub
authored andcommitted
Disable failing test InterlockedTests.MemoryBarrierProcessWide (dotnet#33139)
* Disable failing test InterlockedTests.MemoryBarrierProcessWide - Temporarily disabling on arm64 due to https://github.com/dotnet/coreclr/issues/20215 - The issue may exist on other architectures, but we have only seen failures on arm64 so far * Move property to PlatformDetection * Fix
1 parent 2f2bf63 commit 42f0c49

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public static partial class PlatformDetection
4646
public static bool ClientWebSocketPartialMessagesSupported { get { throw null; } }
4747
public static bool HasWindowsShell { get { throw null; } }
4848
public static bool IsArmProcess { get { throw null; } }
49+
public static bool IsArm64Process { get { throw null; } }
4950
public static bool IsAlpine { get { throw null; } }
5051
public static bool IsCentos6 { get { throw null; } }
5152
public static bool IsDebian { get { throw null; } }
@@ -66,6 +67,7 @@ public static partial class PlatformDetection
6667
public static bool IsNonZeroLowerBoundArraySupported { get { throw null; } }
6768
public static bool IsNotIntMaxValueArrayIndexSupported { get { throw null; } }
6869
public static bool IsNotArmProcess { get { throw null; } }
70+
public static bool IsNotArm64Process { get { throw null; } }
6971
public static bool IsNotFedoraOrRedHatFamily { get { throw null; } }
7072
public static bool IsNotMacOsHighSierraOrHigher { get { throw null; } }
7173
public static bool IsNotNetNative { get { throw null; } }

src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.cs

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public static partial class PlatformDetection
3535
public static bool IsDrawingSupported => (IsNotWindowsNanoServer && IsNotWindowsIoTCore);
3636
public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm;
3737
public static bool IsNotArmProcess => !IsArmProcess;
38+
public static bool IsArm64Process => RuntimeInformation.ProcessArchitecture == Architecture.Arm64;
39+
public static bool IsNotArm64Process => !IsArm64Process;
3840

3941
public static bool IsNotInAppContainer => !IsInAppContainer;
4042
public static bool IsWinRTSupported => IsWindows && !IsWindows7;

src/System.Threading/tests/InterlockedTests.netcoreapp.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Diagnostics;
77
using System.Threading.Tasks;
88
using System.Runtime.CompilerServices;
9+
using System.Runtime.InteropServices;
910
using Xunit;
1011

1112
namespace System.Threading.Tests
@@ -97,7 +98,7 @@ private LockCookie EnterSlow()
9798
}
9899
}
99100

100-
[Fact]
101+
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotArm64Process))] // issue: https://github.com/dotnet/coreclr/issues/20215
101102
public void MemoryBarrierProcessWide()
102103
{
103104
// Stress MemoryBarrierProcessWide correctness using a simple AsymmetricLock

0 commit comments

Comments
 (0)