Skip to content

Commit

Permalink
[browser][MT] troubleshooting deadlocks (dotnet#104539)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Jul 9, 2024
1 parent ddd9617 commit 844e6fe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public static async Task Task_WhenAny_TwoTasks_WakesOnFirstCompletion()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99500", TestPlatforms.Browser)]
public static void CancellationTokenRegitration()
{
ManualResetEvent mre = new ManualResetEvent(false);
Expand All @@ -312,6 +313,7 @@ public static void CancellationTokenRegitration()
/// verify that the taskawaiter.UnsafeOnCompleted is invoked
/// </summary>
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99500", TestPlatforms.Browser)]
public static void TaskAwaiter()
{
ManualResetEvent mre = new ManualResetEvent(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void AsyncEnumerableWithDelays()
{
var source = new InstrumentedAsyncEnumerable<int>(CreateSourceEnumerable());
Expand Down Expand Up @@ -104,6 +105,7 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void AsyncEnumerableWithException()
{
var source = new InstrumentedAsyncEnumerable<int>(CreateSourceEnumerable());
Expand Down Expand Up @@ -132,6 +134,7 @@ static async IAsyncEnumerable<int> CreateSourceEnumerable()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void AsyncEnumerableWithCancellation()
{
var source = new InstrumentedAsyncEnumerable<string>(CreateSourceEnumerable());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,7 @@ public static void RunContinuationCancelTest_State()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void TestNoDeadlockOnContinueWith()
{
Debug.WriteLine("TestNoDeadlockOnContinueWith: shouldn't deadlock if it passes.");
Expand Down Expand Up @@ -1255,6 +1256,7 @@ public static void LongContinuationChain_Unwrap_DoesNotStackOverflow()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void LongContinuationChain_Await_DoesNotStackOverflow()
{
const int DiveDepth = 12_000;
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Threading/tests/MutexTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ private static void IncrementValueInFileNTimes(Mutex mutex, string fileName, int
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/96191", TestPlatforms.Browser)]
public void NamedMutex_ThreadExitDisposeRaceTest()
{
var mutexName = Guid.NewGuid().ToString("N");
Expand Down
1 change: 1 addition & 0 deletions src/libraries/System.Threading/tests/SemaphoreSlimTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public static void RunSemaphoreSlimTest1_WaitAsync()
}

[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/99519", TestPlatforms.Browser)]
public static void RunSemaphoreSlimTest1_WaitAsync_NegativeCases()
{
// Invalid timeout
Expand Down

0 comments on commit 844e6fe

Please sign in to comment.