From 043a5e3d2c5b1c326a3eb70c858213236b3ab3b3 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Tue, 10 Aug 2021 18:30:35 +0200 Subject: [PATCH 01/12] Upgrade SDK to 6.0.100-rc.1.21379.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both the AzDO and the Core-Eng team believe believe that the issue is on our side and was caused by a thread pool regression. The assumption stands that we need to update to a newer SDK which contains the fix for the thread pool hang. Pros: - AzDO and Core-Eng believe that this will mitigate the AzDO feed restore issues. Cons: - We will upgrade to an unsigned SDK build. Arcade and other repos already did the same to workaround the issue. - That SDK build isn’t officially released and won’t until RC 1 ships. This means that developers need to install that build via the nightly channel (from https://github.com/dotnet/installer) if they want to use their globally installed SDK in combination with dotnet/runtime. - Even though this is a breaking change, we can’t wait for the next monthly infrastructure rollout. --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 0be8ec34619f55..8146139e389713 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "6.0.100-preview.6.21355.2", + "version": "6.0.100-rc.1.21379.2", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100-preview.6.21355.2" + "dotnet": "6.0.100-rc.1.21379.2" }, "native-tools": { "cmake": "3.16.4", From dc94950007131e6d6611fc55bb2dc2905632a5b6 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 9 Aug 2021 21:30:26 -0500 Subject: [PATCH 02/12] set StaticWebAssetsEnabled=false --- .../System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj | 1 + .../Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj | 1 + .../tests/StressTests/HttpStress/HttpStress.csproj | 1 + src/mono/wasm/debugger/BrowserDebugHost/BrowserDebugHost.csproj | 1 + 4 files changed, 4 insertions(+) diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj index 875277b02d31a4..c70bc3417862e1 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/NetCoreServer/NetCoreServer.csproj @@ -5,6 +5,7 @@ InProcess Exe false + false diff --git a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj index ba8a85a059c54d..cdd05460ce7595 100644 --- a/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj +++ b/src/libraries/Common/tests/System/Net/Prerequisites/RemoteLoopServer/RemoteLoopServer.csproj @@ -4,6 +4,7 @@ $(AspNetCoreAppCurrent) InProcess Exe + false diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj index 80b4aa21b108ba..1ab48e1af51f36 100644 --- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj +++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/HttpStress.csproj @@ -5,6 +5,7 @@ net6.0 preview enable + false diff --git a/src/mono/wasm/debugger/BrowserDebugHost/BrowserDebugHost.csproj b/src/mono/wasm/debugger/BrowserDebugHost/BrowserDebugHost.csproj index 66d0b287f76559..0859f141b97acd 100644 --- a/src/mono/wasm/debugger/BrowserDebugHost/BrowserDebugHost.csproj +++ b/src/mono/wasm/debugger/BrowserDebugHost/BrowserDebugHost.csproj @@ -1,6 +1,7 @@ + false $(AspNetCoreAppCurrent) true $(NoWarn),CA2007 From cf597f19522b44ed5f6e1d79905b67e9854e8b6e Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 11 Aug 2021 11:43:17 -0500 Subject: [PATCH 03/12] Remove IsSupported2 since asserting it is true when it might not be --- .../System.Runtime.Loader/tests/ApplyUpdateTest.cs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs b/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs index 7b19a79c59a1d8..9836a6cd2d1df1 100644 --- a/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs @@ -223,12 +223,5 @@ public static void IsSupported() bool result = MetadataUpdater.IsSupported; Assert.False(result); } - - [ConditionalFact(typeof(ApplyUpdateUtil), nameof(ApplyUpdateUtil.TestUsingLaunchEnvironment))] - public static void IsSupported2() - { - bool result = MetadataUpdater.IsSupported; - Assert.True(result); - } } } From dc42abcc2d47a1275995e6e36e4e162c99cc2c8b Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 11 Aug 2021 17:07:46 -0500 Subject: [PATCH 04/12] Try enabling the runtimeconfig generator everywhere --- eng/testing/tests.mobile.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 572213ee2c7830..e525483f764d9b 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -54,7 +54,7 @@ AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)" Condition="'$(RuntimeConfigParserTasksAssemblyPath)' != ''" /> - + $(PublishDir)$(AssemblyName).runtimeconfig.json $(PublishDir)runtimeconfig.bin From 55674cf4843f6e6650519d41ce3f036306318155 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Wed, 11 Aug 2021 17:46:45 -0500 Subject: [PATCH 05/12] Revert part of runtimeconfig parser change --- eng/testing/tests.mobile.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index e525483f764d9b..d264a9aadc44b8 100644 --- a/eng/testing/tests.mobile.targets +++ b/eng/testing/tests.mobile.targets @@ -54,7 +54,7 @@ AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)" Condition="'$(RuntimeConfigParserTasksAssemblyPath)' != ''" /> - + $(PublishDir)$(AssemblyName).runtimeconfig.json $(PublishDir)runtimeconfig.bin From a9b46861ac675c1d5355467c5d8fc828c7d9214e Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 11 Aug 2021 17:53:41 -0500 Subject: [PATCH 06/12] Fix System.Text.Json tests to run with trimming by setting MetadataUpdaterSupport=true. Work around SDK issue by overwriting EnableUnsafeUTF7Encoding in System.Text.Encoding --- .../System.Text.Encoding/tests/Directory.Build.targets | 7 +++++++ .../System.Text.Json.Tests/System.Text.Json.Tests.csproj | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 src/libraries/System.Text.Encoding/tests/Directory.Build.targets diff --git a/src/libraries/System.Text.Encoding/tests/Directory.Build.targets b/src/libraries/System.Text.Encoding/tests/Directory.Build.targets new file mode 100644 index 00000000000000..5a32ee9da23ea1 --- /dev/null +++ b/src/libraries/System.Text.Encoding/tests/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + + true + + \ No newline at end of file diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj index adf5503a96e755..762ddff9f0cb7a 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj @@ -8,6 +8,8 @@ true + + true $(WasmXHarnessArgs) --timeout=1800 From bfaa2f7c9f767a34a9ff9db728fa2a102f7381fa Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 11 Aug 2021 16:09:45 -0700 Subject: [PATCH 07/12] Disable bundling tests on Mac due to bug See https://github.com/dotnet/runtime/issues/57242 --- .../Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs index 2c2d79b4a14429..3b0fe6f160aff5 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundleAndRun.cs @@ -100,6 +100,7 @@ private string RelativePath(string path) } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)] public void TestWithAbsolutePaths() { var fixture = sharedTestState.TestFixture.Copy(); @@ -108,6 +109,7 @@ public void TestWithAbsolutePaths() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)] public void TestWithRelativePaths() { var fixture = sharedTestState.TestFixture.Copy(); @@ -116,6 +118,7 @@ public void TestWithRelativePaths() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/57242", TestPlatforms.OSX)] public void TestWithRelativePathsDirSeparator() { var fixture = sharedTestState.TestFixture.Copy(); From 4f834136629be63c88fb305a3221b78167d5f796 Mon Sep 17 00:00:00 2001 From: John Salem Date: Wed, 11 Aug 2021 23:58:38 +0000 Subject: [PATCH 08/12] Make ProcessInfo tests resilient to RuntimeConfig switches on commandline --- .../eventpipe/processinfo/processinfo.cs | 30 ++++++++++++++++--- .../eventpipe/processinfo2/processinfo2.cs | 30 ++++++++++++++++--- 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/src/tests/tracing/eventpipe/processinfo/processinfo.cs b/src/tests/tracing/eventpipe/processinfo/processinfo.cs index ebeb602e8f014a..6e305bedc6b75b 100644 --- a/src/tests/tracing/eventpipe/processinfo/processinfo.cs +++ b/src/tests/tracing/eventpipe/processinfo/processinfo.cs @@ -8,6 +8,7 @@ using System.IO; using System.Linq; using System.Runtime.InteropServices; +using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Diagnostics.Tools.RuntimeClient; @@ -55,10 +56,31 @@ public static string NormalizeCommandLine(string cmdline) } } - string normalizedCommandLine = parts - .Where(part => !string.IsNullOrWhiteSpace(part)) - .Select(part => (new FileInfo(part)).FullName) - .Aggregate((s1, s2) => string.Join(' ', s1, s2)); + StringBuilder sb = new(); + bool isArgument = false; + for (int i = 0; i < parts.Count; i++) + { + if (string.IsNullOrEmpty(parts[i])) + continue; + else if (parts[i].StartsWith('-')) + { + // if we see '-', then assume it's a '-option argument' pair + sb.Append(parts[i] + " "); + isArgument = true; + } + else if (isArgument) + { + sb.Append(parts[i] + " "); + isArgument = false; + } + else + { + // assume anything else is a file/executable so get the full path + sb.Append((new FileInfo(parts[i])).FullName + " "); + } + } + + string normalizedCommandLine = sb.ToString().Trim(); // Tests are run out of /tmp on Mac and linux, but on Mac /tmp is actually a symlink that points to /private/tmp. // This isn't represented in the output from FileInfo.FullName unfortunately, so we'll fake that completion in that case. diff --git a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs index 08a10821041185..282a90c6a89a0b 100644 --- a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs +++ b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs @@ -9,6 +9,7 @@ using System.Linq; using System.Runtime.InteropServices; using System.Reflection; +using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Diagnostics.Tools.RuntimeClient; @@ -56,10 +57,31 @@ public static string NormalizeCommandLine(string cmdline) } } - string normalizedCommandLine = parts - .Where(part => !string.IsNullOrWhiteSpace(part)) - .Select(part => (new FileInfo(part)).FullName) - .Aggregate((s1, s2) => string.Join(' ', s1, s2)); + StringBuilder sb = new(); + bool isArgument = false; + for (int i = 0; i < parts.Count; i++) + { + if (string.IsNullOrEmpty(parts[i])) + continue; + else if (parts[i].StartsWith('-')) + { + // if we see '-', then assume it's a '-option argument' pair + sb.Append(parts[i] + " "); + isArgument = true; + } + else if (isArgument) + { + sb.Append(parts[i] + " "); + isArgument = false; + } + else + { + // assume anything else is a file/executable so get the full path + sb.Append((new FileInfo(parts[i])).FullName + " "); + } + } + + string normalizedCommandLine = sb.ToString().Trim(); // Tests are run out of /tmp on Mac and linux, but on Mac /tmp is actually a symlink that points to /private/tmp. // This isn't represented in the output from FileInfo.FullName unfortunately, so we'll fake that completion in that case. From cb336a0e1fe8a5d741327a1dab3e0d7cf0eac435 Mon Sep 17 00:00:00 2001 From: Dan Moseley Date: Wed, 11 Aug 2021 21:01:27 -0600 Subject: [PATCH 09/12] Update global.json Updating to 6.0.100-rc.1.21411.13 --- global.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 8146139e389713..bbe34ff41ce0af 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "6.0.100-rc.1.21379.2", + "version": "6.0.100-rc.1.21411.13", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100-rc.1.21379.2" + "dotnet": "6.0.100-rc.1.21411.13" }, "native-tools": { "cmake": "3.16.4", From d93e250c5188c45a012cd9c1555e6d19faacca33 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Wed, 11 Aug 2021 22:33:01 -0500 Subject: [PATCH 10/12] Update to latest SDK. Remove System.Text.Encoding.Tests workaround --- global.json | 4 ++-- .../System.Text.Encoding/tests/Directory.Build.targets | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 src/libraries/System.Text.Encoding/tests/Directory.Build.targets diff --git a/global.json b/global.json index bbe34ff41ce0af..54868279fe7452 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "6.0.100-rc.1.21411.13", + "version": "6.0.100-rc.1.21411.28", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100-rc.1.21411.13" + "dotnet": "6.0.100-rc.1.21411.28" }, "native-tools": { "cmake": "3.16.4", diff --git a/src/libraries/System.Text.Encoding/tests/Directory.Build.targets b/src/libraries/System.Text.Encoding/tests/Directory.Build.targets deleted file mode 100644 index 5a32ee9da23ea1..00000000000000 --- a/src/libraries/System.Text.Encoding/tests/Directory.Build.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - - true - - \ No newline at end of file From 6b50bfb2d21dadd7d67797b8b12bdeb4a6a15281 Mon Sep 17 00:00:00 2001 From: John Salem Date: Thu, 12 Aug 2021 15:31:29 +0000 Subject: [PATCH 11/12] ignore runtimeconfig switches _if_ they show up --- src/tests/tracing/eventpipe/processinfo/processinfo.cs | 4 +--- src/tests/tracing/eventpipe/processinfo2/processinfo2.cs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/tests/tracing/eventpipe/processinfo/processinfo.cs b/src/tests/tracing/eventpipe/processinfo/processinfo.cs index 6e305bedc6b75b..f6cbb2117c3cc4 100644 --- a/src/tests/tracing/eventpipe/processinfo/processinfo.cs +++ b/src/tests/tracing/eventpipe/processinfo/processinfo.cs @@ -64,13 +64,11 @@ public static string NormalizeCommandLine(string cmdline) continue; else if (parts[i].StartsWith('-')) { - // if we see '-', then assume it's a '-option argument' pair - sb.Append(parts[i] + " "); + // if we see '-', then assume it's a '-option argument' pair and remove isArgument = true; } else if (isArgument) { - sb.Append(parts[i] + " "); isArgument = false; } else diff --git a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs index 282a90c6a89a0b..31f4b677681c2a 100644 --- a/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs +++ b/src/tests/tracing/eventpipe/processinfo2/processinfo2.cs @@ -65,13 +65,11 @@ public static string NormalizeCommandLine(string cmdline) continue; else if (parts[i].StartsWith('-')) { - // if we see '-', then assume it's a '-option argument' pair - sb.Append(parts[i] + " "); + // if we see '-', then assume it's a '-option argument' pair and remove isArgument = true; } else if (isArgument) { - sb.Append(parts[i] + " "); isArgument = false; } else From df6f5e2c56128e68794b997eb531e33e7fe336f7 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 12 Aug 2021 11:18:14 -0700 Subject: [PATCH 12/12] Remove test which uses `dotnet run, which is SDK-specific --- .../AppHostUsedWithSymbolicLinks.cs | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs index e00441d92e0cf1..637ad3c3218127 100644 --- a/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs +++ b/src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs @@ -191,28 +191,6 @@ public void Put_app_directory_behind_symlink_and_use_dotnet() .And.HaveStdOutContaining("Hello World"); } - [Fact] - [SkipOnPlatform(TestPlatforms.Windows, "Creating symbolic links requires administrative privilege on Windows, so skip test.")] - public void Put_app_directory_behind_symlink_and_use_dotnet_run() - { - var fixture = sharedTestState.StandaloneAppFixture_Published - .Copy(); - - var dotnet = fixture.SdkDotnet; - var binDir = fixture.TestProject.OutputDirectory; - var binDirNewPath = Path.Combine(Directory.GetParent(fixture.TestProject.Location).ToString(), "PutTheBinDirSomewhereElse"); - Directory.Move(binDir, binDirNewPath); - - using var symlink = new SymLink(binDir, binDirNewPath); - dotnet.Exec("run") - .WorkingDirectory(fixture.TestProject.Location) - .CaptureStdErr() - .CaptureStdOut() - .Execute() - .Should().Pass() - .And.HaveStdOutContaining("Hello World"); - } - [Fact] // If enabled, this tests will need to set the console code page to output unicode characters: Command.Create("chcp 65001").Execute(); [SkipOnPlatform(TestPlatforms.Windows, "Creating symbolic links requires administrative privilege on Windows, so skip test.")]