From 52c9c971f4cd0388b69c0c3130acc4c3f6bafe2d Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Fri, 19 May 2023 16:07:12 +0200 Subject: [PATCH 01/14] Block for multithreading. --- .../debugger/DebuggerTestSuite/AsyncTests.cs | 8 +++++++ .../DebuggerTestSuite.csproj | 3 ++- .../DebuggerTestSuite/SetNextIpTests.cs | 24 +++++++++++++++++-- .../DebuggerTestSuite/SteppingTests.cs | 4 ++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs index ec2aa8a200f9cf..795e23588d33ac 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs @@ -43,7 +43,11 @@ public async Task AsyncLocalsInContinueWith(string method_name, string expected_ await CheckValue(res.Value["result"], TEnum("System.Threading.Tasks.TaskStatus", "RanToCompletion"), "t.Status"); }); +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "ContinueWithInstanceUsingThisAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.ContinueWithInstanceUsingThisAsync.AnonymousMethod__6_0", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", @@ -65,7 +69,11 @@ public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await Che await CheckValue(res.Value["result"], TDateTime(new DateTime(2510, 1, 2, 3, 4, 5)), "this.Date"); }); +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [Fact] // NestedContinueWith +# endif public async Task AsyncLocalsInNestedContinueWithStaticBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "NestedContinueWithStaticAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithStaticAsync", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj index 913421bc9a748a..beea66ae578975 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj +++ b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj @@ -6,6 +6,7 @@ false chrome $(DefineConstants);RUN_IN_CHROME + $(DefineConstants);FEATURE_WASM_THREADS windows <_ProvisionBrowser Condition="'$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv')">true true @@ -23,7 +24,7 @@ - diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs index f19f5a556a3cf8..cd7477ee5201b2 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs @@ -112,7 +112,11 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-test.cs", }); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task Lambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -158,7 +162,11 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes }); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task Lambda_InvalidLocation() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -187,7 +195,11 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task Lambda_ToNestedLambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -206,7 +218,7 @@ public async Task Lambda_ToNestedLambda() await SetNextIPAndCheck(top_frame["scriptId"].Value(), "dotnet://debugger-test.dll/debugger-async-test.cs", 88, 20, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithInstanceAsync", expected_error: true); - + await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-test.cs", 79, 16, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithInstanceAsync", locals_fn: async (locals) => { @@ -217,7 +229,11 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task Lambda_ToNestedSingleLineLambda_Invalid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -247,7 +263,11 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalFact(nameof(RunningOnChrome))] +# endif public async Task Lambda_ToNestedSingleLineLambda_Valid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -271,7 +291,7 @@ await SetNextIPAndCheck(top_frame["scriptId"].Value(), "dotnet://debugge await CheckValueType(locals, "code", "System.Threading.Tasks.TaskStatus", description: "Created"); await CheckValueType(locals, "dt0", "System.DateTime", description: "1/1/0001 12:00:00 AM"); }); - + await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-test.cs", 92, 12, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithInstanceAsync", locals_fn: async (locals) => { diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs index e04639e8e420aa..4aba682cac812d 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs @@ -879,7 +879,11 @@ await EvaluateAndCheck( $"DebuggerTests.AsyncTests.ContinueWithTests.{method_name}"); } +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [ConditionalTheory(nameof(RunningOnChrome))] +# endif [InlineData(112, 16, 114, 16, "HiddenLinesInAnAsyncBlock")] [InlineData(130, 16, 133, 16, "HiddenLinesJustBeforeANestedAsyncBlock")] [InlineData(153, 20, 155, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithNoLinesAtEndOfTheMethod.AnonymousMethod__1")] From d6f42593a3ebf4e26bd1fff62e3726d645d93824 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Mon, 22 May 2023 14:39:22 +0200 Subject: [PATCH 02/14] Another failing test. --- src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index adb1e04d8a7f83..c7aa2a7682f67f 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -213,10 +213,15 @@ await EvaluateAndCheck( { "invoke_add()", "IntAdd", "null", false }, }; + +# if FEATURE_WASM_THREADS + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] +# else [Theory] [MemberData(nameof(FalseConditions))] [MemberData(nameof(TrueConditions))] [MemberData(nameof(InvalidConditions))] +# endif public async Task ConditionalBreakpoint2(string function_to_call, string method_to_stop, string condition, bool bp_stop_expected) { Result [] bps = new Result[2]; From 81c57abcb8962ddf65c15cc5f6b27cf201fa588a Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Mon, 22 May 2023 17:17:16 +0000 Subject: [PATCH 03/14] category - case matters. --- .../TestUtilities/System/PlatformDetection.cs | 2 ++ src/mono/wasi/Makefile | 4 +-- src/mono/wasm/Makefile | 4 +-- .../debugger/DebuggerTestSuite/AsyncTests.cs | 10 ++------ .../DebuggerTestSuite/BreakpointTests.cs | 5 +--- .../DebuggerTestSuite/SetNextIpTests.cs | 25 ++++--------------- .../DebuggerTestSuite/SteppingTests.cs | 13 ++++------ 7 files changed, 19 insertions(+), 44 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index e26bbb982ec3df..b632ce6c6aaa60 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -117,6 +117,8 @@ public static bool IsPrivilegedProcess #endif public static bool IsThreadingSupported => !IsBrowser && !IsWasi; + public static readonly Lazy IsThreadingOn = new Lazy(() + => (bool?)Type.GetType("System.Threading.Thread")?.GetProperty("IsThreadStartSupported", BindingFlags.NonPublic | BindingFlags.Static)?.GetValue(null) == true); public static bool IsBinaryFormatterSupported => IsNotMobile && !IsNativeAot; public static bool IsStartingProcessesSupported => !IsiOS && !IstvOS; diff --git a/src/mono/wasi/Makefile b/src/mono/wasi/Makefile index 2905f09f803c7d..9cd33abfa2f003 100644 --- a/src/mono/wasi/Makefile +++ b/src/mono/wasi/Makefile @@ -104,9 +104,9 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "Category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "Category!=failing" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ fi build-dbg-proxy: diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index d5c184ab6656b7..e570759bd3c5bf 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -145,9 +145,9 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "Category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "Category!=failing" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ fi build-dbg-proxy: diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs index 795e23588d33ac..2ad939ee7528f1 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs @@ -43,11 +43,8 @@ public async Task AsyncLocalsInContinueWith(string method_name, string expected_ await CheckValue(res.Value["result"], TEnum("System.Threading.Tasks.TaskStatus", "RanToCompletion"), "t.Status"); }); -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "ContinueWithInstanceUsingThisAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.ContinueWithInstanceUsingThisAsync.AnonymousMethod__6_0", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", @@ -69,11 +66,8 @@ public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await Che await CheckValue(res.Value["result"], TDateTime(new DateTime(2510, 1, 2, 3, 4, 5)), "this.Date"); }); -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [Fact] // NestedContinueWith -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task AsyncLocalsInNestedContinueWithStaticBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "NestedContinueWithStaticAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithStaticAsync", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index c7aa2a7682f67f..d5cbc9fd90cc15 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -214,14 +214,11 @@ await EvaluateAndCheck( }; -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [Theory] [MemberData(nameof(FalseConditions))] [MemberData(nameof(TrueConditions))] [MemberData(nameof(InvalidConditions))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task ConditionalBreakpoint2(string function_to_call, string method_to_stop, string condition, bool bp_stop_expected) { Result [] bps = new Result[2]; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs index cd7477ee5201b2..d1fe63d77ba7d0 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs @@ -112,11 +112,8 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-test.cs", }); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task Lambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -162,11 +159,8 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes }); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task Lambda_InvalidLocation() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -195,11 +189,8 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task Lambda_ToNestedLambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -229,11 +220,8 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task Lambda_ToNestedSingleLineLambda_Invalid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -263,11 +251,8 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes times: 2); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalFact(nameof(RunningOnChrome))] -# endif + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task Lambda_ToNestedSingleLineLambda_Valid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs index 4aba682cac812d..6aa9dc984f4daa 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs @@ -702,8 +702,8 @@ await EvaluateAndCheck( await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-step.cs", 15, 12, "MoveNext"); } - // [ConditionalFact(nameof(RunningOnChrome))] - //[ActiveIssue("https://github.com/dotnet/runtime/issues/42421")] + [ConditionalFact(nameof(RunningOnChrome))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/42421")] public async Task StepOutOfAsyncMethod() { string source_file = "dotnet://debugger-test.dll/debugger-async-step.cs"; @@ -865,8 +865,8 @@ await EvaluateAndCheck( method_name); } - // [ConditionalTheory(nameof(RunningOnChrome))] - //[ActiveIssue("https://github.com/dotnet/runtime/issues/73867")] + [ConditionalTheory(nameof(RunningOnChrome))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/73867")] [InlineData(184, 20, 161, 8, "HiddenLinesContainingStartOfAnAsyncBlock")] [InlineData(206, 20, 201, 8, "HiddenLinesAtTheEndOfANestedAsyncBlockWithWithLineDefaultOutsideTheMethod")] [InlineData(224, 20, 220, 8, "HiddenLinesAtTheEndOfANestedAsyncBlockWithWithLineDefaultOutsideTheMethod2")] @@ -879,16 +879,13 @@ await EvaluateAndCheck( $"DebuggerTests.AsyncTests.ContinueWithTests.{method_name}"); } -# if FEATURE_WASM_THREADS - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496")] -# else [ConditionalTheory(nameof(RunningOnChrome))] -# endif [InlineData(112, 16, 114, 16, "HiddenLinesInAnAsyncBlock")] [InlineData(130, 16, 133, 16, "HiddenLinesJustBeforeANestedAsyncBlock")] [InlineData(153, 20, 155, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithNoLinesAtEndOfTheMethod.AnonymousMethod__1")] [InlineData(154, 20, 155, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithNoLinesAtEndOfTheMethod.AnonymousMethod__1")] [InlineData(170, 20, 172, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithBreakableLineAtEndOfTheMethod.AnonymousMethod__1")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] public async Task BreakpointOnHiddenLineShouldStopAtEarliestNextAvailableLineAsync(int line_bp, int column_bp, int line_pause, int column_pause, string method_name) { await SetBreakpoint("dotnet://debugger-test.dll/debugger-async-test.cs", line_bp, column_bp); From 8dfddd541fd7e00b8b292a228114c50cccafa971 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Mon, 22 May 2023 17:18:04 +0000 Subject: [PATCH 04/14] Cleanup. --- .../wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj index beea66ae578975..3f7c743ed7f880 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj +++ b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj @@ -6,7 +6,6 @@ false chrome $(DefineConstants);RUN_IN_CHROME - $(DefineConstants);FEATURE_WASM_THREADS windows <_ProvisionBrowser Condition="'$(ContinuousIntegrationBuild)' == 'true' or Exists('/.dockerenv')">true true From 0e8033e487befb9e9d8c0ba1051e3870ad25ee66 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 23 May 2023 08:46:12 +0000 Subject: [PATCH 05/14] "Result reported for unknown test case" fix. Cannot be lazy. --- .../Common/tests/TestUtilities/System/PlatformDetection.cs | 3 +-- .../wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index b632ce6c6aaa60..6090982d6e9ad1 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -117,8 +117,7 @@ public static bool IsPrivilegedProcess #endif public static bool IsThreadingSupported => !IsBrowser && !IsWasi; - public static readonly Lazy IsThreadingOn = new Lazy(() - => (bool?)Type.GetType("System.Threading.Thread")?.GetProperty("IsThreadStartSupported", BindingFlags.NonPublic | BindingFlags.Static)?.GetValue(null) == true); + public static readonly bool IsThreadingOn => Type.GetType("System.Threading.Thread")?.GetProperty("IsThreadStartSupported", BindingFlags.NonPublic | BindingFlags.Static)?.GetValue(null) == true; public static bool IsBinaryFormatterSupported => IsNotMobile && !IsNativeAot; public static bool IsStartingProcessesSupported => !IsiOS && !IstvOS; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj index 3f7c743ed7f880..913421bc9a748a 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj +++ b/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestSuite.csproj @@ -23,7 +23,7 @@ - From b7c8dcfa6ecedee4de9ed6e35e8ca11af73e0942 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 23 May 2023 09:20:05 +0000 Subject: [PATCH 06/14] Debugger has its own treading feature discovery. --- .../tests/TestUtilities/System/PlatformDetection.cs | 1 - src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs | 6 +++--- .../wasm/debugger/DebuggerTestSuite/BreakpointTests.cs | 2 +- .../wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs | 10 +++++----- .../wasm/debugger/DebuggerTestSuite/SteppingTests.cs | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs index 6090982d6e9ad1..e26bbb982ec3df 100644 --- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs +++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs @@ -117,7 +117,6 @@ public static bool IsPrivilegedProcess #endif public static bool IsThreadingSupported => !IsBrowser && !IsWasi; - public static readonly bool IsThreadingOn => Type.GetType("System.Threading.Thread")?.GetProperty("IsThreadStartSupported", BindingFlags.NonPublic | BindingFlags.Static)?.GetValue(null) == true; public static bool IsBinaryFormatterSupported => IsNotMobile && !IsNativeAot; public static bool IsStartingProcessesSupported => !IsiOS && !IstvOS; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs index 2ad939ee7528f1..c8eba90986652c 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs @@ -30,6 +30,7 @@ public async Task AsyncLocalsInContinueWith(string method_name, string expected_ "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", wait_for_event_fn: async (pause_location) => { + var frame_locals = await GetProperties(pause_location["callFrames"][0]["callFrameId"].Value()); await CheckProps(frame_locals, new { @@ -44,7 +45,7 @@ public async Task AsyncLocalsInContinueWith(string method_name, string expected_ }); [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "ContinueWithInstanceUsingThisAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.ContinueWithInstanceUsingThisAsync.AnonymousMethod__6_0", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", @@ -67,7 +68,7 @@ public async Task AsyncLocalsInContinueWithInstanceUsingThisBlock() => await Che }); [Fact] // NestedContinueWith - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task AsyncLocalsInNestedContinueWithStaticBlock() => await CheckInspectLocalsAtBreakpointSite( "DebuggerTests.AsyncTests.ContinueWithTests", "NestedContinueWithStaticAsync", 5, "DebuggerTests.AsyncTests.ContinueWithTests.NestedContinueWithStaticAsync", "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", @@ -142,7 +143,6 @@ await StepAndCheck(StepKind.Resume, source_to_pause, line2, col2, func_to_pause, public async Task InspectLocalsInAsyncVBMethod() { var expression = $"{{ invoke_static_method('[debugger-test-vb] DebuggerTestVB.TestVbScope:Run'); }}"; - await EvaluateAndCheck( "window.setTimeout(function() {" + expression + "; }, 1);", "dotnet://debugger-test-vb.dll/debugger-test-vb.vb", 14, 12, diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index d5cbc9fd90cc15..8599f3c3d8b119 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -218,7 +218,7 @@ await EvaluateAndCheck( [MemberData(nameof(FalseConditions))] [MemberData(nameof(TrueConditions))] [MemberData(nameof(InvalidConditions))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task ConditionalBreakpoint2(string function_to_call, string method_to_stop, string condition, bool bp_stop_expected) { Result [] bps = new Result[2]; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs index d1fe63d77ba7d0..d2cafa0886717e 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SetNextIpTests.cs @@ -113,7 +113,7 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-test.cs", } [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task Lambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -160,7 +160,7 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes } [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task Lambda_InvalidLocation() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -190,7 +190,7 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes } [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task Lambda_ToNestedLambda() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -221,7 +221,7 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes } [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task Lambda_ToNestedSingleLineLambda_Invalid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; @@ -252,7 +252,7 @@ await StepAndCheck(StepKind.Over, "dotnet://debugger-test.dll/debugger-async-tes } [ConditionalFact(nameof(RunningOnChrome))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task Lambda_ToNestedSingleLineLambda_Valid() { var debugger_test_loc = "dotnet://debugger-test.dll/debugger-async-test.cs"; diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs index 6aa9dc984f4daa..69c3bca36f6a1c 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs @@ -885,7 +885,7 @@ await EvaluateAndCheck( [InlineData(153, 20, 155, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithNoLinesAtEndOfTheMethod.AnonymousMethod__1")] [InlineData(154, 20, 155, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithNoLinesAtEndOfTheMethod.AnonymousMethod__1")] [InlineData(170, 20, 172, 16, "HiddenLinesAtTheEndOfANestedAsyncBlockWithBreakableLineAtEndOfTheMethod.AnonymousMethod__1")] - [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingOn))] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task BreakpointOnHiddenLineShouldStopAtEarliestNextAvailableLineAsync(int line_bp, int column_bp, int line_pause, int column_pause, string method_name) { await SetBreakpoint("dotnet://debugger-test.dll/debugger-async-test.cs", line_bp, column_bp); From 7c05cccf1f71b1d3096858c61c016e76b720646f Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Tue, 23 May 2023 12:22:43 +0000 Subject: [PATCH 07/14] Prevent trait filter from being overwritten. --- src/mono/wasi/Makefile | 6 +++--- src/mono/wasm/Makefile | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/wasi/Makefile b/src/mono/wasi/Makefile index 9cd33abfa2f003..a6ea4731f7e1d5 100644 --- a/src/mono/wasi/Makefile +++ b/src/mono/wasi/Makefile @@ -103,10 +103,10 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ - if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ + if [ ! -z "$(TEST_ARGS)" ]; then \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) $(TEST_ARGS)"&category!=failing"; \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing"; \ fi build-dbg-proxy: diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index e570759bd3c5bf..eb817360681d30 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -144,10 +144,10 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ - if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ + if [ ! -z "$(TEST_ARGS)" ]; then \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) $(TEST_ARGS)"&category!=failing"; \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing"; \ fi build-dbg-proxy: From 0005c5ab35c0c1ddae295083d373f120e940e60c Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed, 31 May 2023 08:59:30 +0000 Subject: [PATCH 08/14] Applied @radical's review, reverted `TEST_FILTER` removal with changes fixing the issue. --- src/mono/wasi/Makefile | 6 +++--- src/mono/wasm/Makefile | 6 +++--- src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs | 1 - src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs | 1 - .../wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/mono/wasi/Makefile b/src/mono/wasi/Makefile index a6ea4731f7e1d5..37f8136f1ea3e6 100644 --- a/src/mono/wasi/Makefile +++ b/src/mono/wasi/Makefile @@ -103,10 +103,10 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ - if [ ! -z "$(TEST_ARGS)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) $(TEST_ARGS)"&category!=failing"; \ + if [ ! -z "$(TEST_FILTER)" ]; then \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)&FullyQualifiedName$(TEST_FILTER)"; \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)"; \ fi build-dbg-proxy: diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index eb817360681d30..a5bf321c524260 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -144,10 +144,10 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ - if [ ! -z "$(TEST_ARGS)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) $(TEST_ARGS)"&category!=failing"; \ + if [ ! -z "$(TEST_FILTER)" ]; then \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)&FullyQualifiedName$(TEST_FILTER)"; \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)"; \ fi build-dbg-proxy: diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs index c8eba90986652c..0711883eab4e85 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/AsyncTests.cs @@ -30,7 +30,6 @@ public async Task AsyncLocalsInContinueWith(string method_name, string expected_ "window.setTimeout(function() { invoke_static_method('[debugger-test] DebuggerTests.AsyncTests.ContinueWithTests:RunAsync'); })", wait_for_event_fn: async (pause_location) => { - var frame_locals = await GetProperties(pause_location["callFrames"][0]["callFrameId"].Value()); await CheckProps(frame_locals, new { diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index 8599f3c3d8b119..972a2c80b57abd 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -213,7 +213,6 @@ await EvaluateAndCheck( { "invoke_add()", "IntAdd", "null", false }, }; - [Theory] [MemberData(nameof(FalseConditions))] [MemberData(nameof(TrueConditions))] diff --git a/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets b/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets index f51e059372c82e..cc78e25c86cfa3 100644 --- a/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets +++ b/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets @@ -27,8 +27,8 @@ $(TestArchiveTestsDir)Wasm.Debugger.Tests.zip $(HelixCommand) $(_DebuggerTestsWorkItemTimeout) - set "TEST_ARGS=--filter FullyQualifiedName~%(Identity)" - export "TEST_ARGS=--filter FullyQualifiedName~%(Identity)" + set "TEST_ARGS=%24FullyQualifiedName~%(Identity)" + export "TEST_ARGS=%24FullyQualifiedName~%(Identity)" From fefa7e4a21b8c9a16a377736d3f3c10639000ba3 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed, 31 May 2023 09:27:34 +0000 Subject: [PATCH 09/14] Makefiles - full revert, fix should be in msbuild. --- src/mono/wasi/Makefile | 4 ++-- src/mono/wasm/Makefile | 4 ++-- src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mono/wasi/Makefile b/src/mono/wasi/Makefile index 37f8136f1ea3e6..9cd33abfa2f003 100644 --- a/src/mono/wasi/Makefile +++ b/src/mono/wasi/Makefile @@ -104,9 +104,9 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)&FullyQualifiedName$(TEST_FILTER)"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ fi build-dbg-proxy: diff --git a/src/mono/wasm/Makefile b/src/mono/wasm/Makefile index a5bf321c524260..e570759bd3c5bf 100644 --- a/src/mono/wasm/Makefile +++ b/src/mono/wasm/Makefile @@ -145,9 +145,9 @@ submit-tests-helix: run-debugger-tests: rm -f $(TOP)/artifacts/bin/DebuggerTestSuite/x64/Debug/*log; \ if [ ! -z "$(TEST_FILTER)" ]; then \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)&FullyQualifiedName$(TEST_FILTER)"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing&FullyQualifiedName$(TEST_FILTER)" $(TEST_ARGS); \ else \ - $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing$(TEST_ARGS)"; \ + $(DOTNET) test $(TOP)/src/mono/wasm/debugger/DebuggerTestSuite $(MSBUILD_ARGS) "-l:trx;LogFileName=DebuggerTestsResults.xml" --results-directory $(TOP)/artifacts/log/$(CONFIG) --filter "category!=failing" $(TEST_ARGS); \ fi build-dbg-proxy: diff --git a/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets b/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets index cc78e25c86cfa3..f28c4436f13a5e 100644 --- a/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets +++ b/src/mono/wasm/debugger/Wasm.Debugger.Tests/wasm.helix.targets @@ -27,8 +27,8 @@ $(TestArchiveTestsDir)Wasm.Debugger.Tests.zip $(HelixCommand) $(_DebuggerTestsWorkItemTimeout) - set "TEST_ARGS=%24FullyQualifiedName~%(Identity)" - export "TEST_ARGS=%24FullyQualifiedName~%(Identity)" + set "TEST_ARGS=--filter category!=failing&FullyQualifiedName~%(Identity)" + export "TEST_ARGS=--filter category!=failing&FullyQualifiedName~%(Identity)" From 0c44e64ce2acb4e3d115c0543ede47c2cdb1a275 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Wed, 31 May 2023 15:25:52 +0000 Subject: [PATCH 10/14] Failing frequently. --- src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs index 1e87f9e60cc0bf..f03f0518e00205 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/GetPropertiesTests.cs @@ -260,6 +260,7 @@ public GetPropertiesTests(ITestOutputHelper testOutput) : base(testOutput) [MemberData(nameof(ClassGetPropertiesTestData), parameters: false)] [MemberData(nameof(StructGetPropertiesTestData), parameters: true)] [MemberData(nameof(StructGetPropertiesTestData), parameters: false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task InspectTypeInheritedMembers(string type_name, bool? own_properties, bool? accessors_only, string[] expected_names, Dictionary all_props, bool is_async) => await InspectTypeInheritedMembersInternal(type_name, own_properties, accessors_only, expected_names, all_props, is_async, AutoEvaluate.Unset); From 0243222182c3e3c49e98af03519dac98470a4ff1 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Thu, 1 Jun 2023 08:23:03 +0000 Subject: [PATCH 11/14] Fleaky tests. --- src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs | 1 + src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs index ea2fc12f67e084..76b75c452e4d8d 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/AssignmentTests.cs @@ -50,6 +50,7 @@ public AssignmentTests(ITestOutputHelper testOutput) [ConditionalTheory(nameof(RunningOnChrome))] [MemberData("GetTestData")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task InspectVariableBeforeAndAfterAssignment(string clazz, JObject checkDefault, JObject checkValue, string methodName) { await SetBreakpointInMethod("debugger-test", "DebuggerTests." + clazz, "Prepare", 2); diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs index 69c3bca36f6a1c..19875081df6d64 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs @@ -1220,6 +1220,7 @@ await StepAndCheck(StepKind.Into, "dotnet://Newtonsoft.Json.dll/JArray.cs", 350, [ConditionalTheory(nameof(RunningOnChrome))] [InlineData(true)] [InlineData(false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task SkipWasmFunctionsAccordinglyJustMyCode(bool justMyCode) { await SetJustMyCode(justMyCode); From c181a8908acee0f6b388f9666512cb11dc13c24f Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com> Date: Fri, 2 Jun 2023 08:57:32 +0000 Subject: [PATCH 12/14] Now this one failed - block. --- src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs index 972a2c80b57abd..f251ceb78b2296 100644 --- a/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs +++ b/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs @@ -700,6 +700,7 @@ public async Task StepThroughOrNonUserCodeAttributeResumeWithBp(bool justMyCodeE [InlineData(true, "Debugger.stepInto", "RunStepThroughWithNonUserCode", "RunStepThroughWithNonUserCode", -1, 8, "RunStepThroughWithNonUserCode", -1, 4)] [InlineData(false, "Debugger.resume", "RunStepThroughWithNonUserCode", "StepThroughWithNonUserCodeUserBp", 927, 8, "RunStepThroughWithNonUserCode", -1, 4)] [InlineData(true, "Debugger.resume", "RunStepThroughWithNonUserCode", "RunStepThroughWithNonUserCode", -1, 8, "RunStepThroughWithNonUserCode", -1, 4)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/86496", typeof(DebuggerTests), nameof(DebuggerTests.WasmMultiThreaded))] public async Task StepThroughOrNonUserCodeAttributeWithUserBp( bool justMyCodeEnabled, string debuggingFunction, string evalFunName, string functionNameCheck1, int line1, int col1, From 2e008d40b3006e464f3c70030e0de637d17dc426 Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Mon, 5 Jun 2023 13:31:05 +0200 Subject: [PATCH 13/14] 10 min still timeouts, set to 15. --- eng/testing/.runsettings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/testing/.runsettings b/eng/testing/.runsettings index 1dfbe23e6501bd..1dbd20b0d50d4d 100644 --- a/eng/testing/.runsettings +++ b/eng/testing/.runsettings @@ -1,8 +1,8 @@ - - 300000 + + 900000 .\TestResults\ From fc569d1924626558f8433a793b63bf28f0e0fc3c Mon Sep 17 00:00:00 2001 From: Ilona Tomkowicz Date: Mon, 5 Jun 2023 20:33:27 +0200 Subject: [PATCH 14/14] Revert "10 min still timeouts, set to 15." This reverts commit 2e008d40b3006e464f3c70030e0de637d17dc426. --- eng/testing/.runsettings | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/testing/.runsettings b/eng/testing/.runsettings index 1dbd20b0d50d4d..1dfbe23e6501bd 100644 --- a/eng/testing/.runsettings +++ b/eng/testing/.runsettings @@ -1,8 +1,8 @@ - - 900000 + + 300000 .\TestResults\