From 7d12f7596aaadb61a5e6d77184de52dfd560f4a9 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 13 Aug 2021 00:09:01 +0200 Subject: [PATCH] Upgrade SDK to 6.0.100-rc.1.21411.13 (#57143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Upgrade SDK to 6.0.100-rc.1.21379.2 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. * set StaticWebAssetsEnabled=false * Remove IsSupported2 since asserting it is true when it might not be * Try enabling the runtimeconfig generator everywhere * Revert part of runtimeconfig parser change * Fix System.Text.Json tests to run with trimming by setting MetadataUpdaterSupport=true. Work around SDK issue by overwriting EnableUnsafeUTF7Encoding in System.Text.Encoding * Disable bundling tests on Mac due to bug See https://github.com/dotnet/runtime/issues/57242 * Make ProcessInfo tests resilient to RuntimeConfig switches on commandline * Update global.json Updating to 6.0.100-rc.1.21411.13 * Update to latest SDK. Remove System.Text.Encoding.Tests workaround * ignore runtimeconfig switches _if_ they show up * Remove test which uses `dotnet run, which is SDK-specific Co-authored-by: Larry Ewing Co-authored-by: Eric Erhardt Co-authored-by: Andy Gocke Co-authored-by: John Salem Co-authored-by: Dan Moseley --- eng/testing/tests.mobile.targets | 2 +- global.json | 4 +-- .../AppHostUsedWithSymbolicLinks.cs | 22 --------------- .../BundleAndRun.cs | 3 ++ .../tests/ApplyUpdateTest.cs | 7 ----- .../System.Text.Json.Tests.csproj | 2 ++ .../eventpipe/processinfo/processinfo.cs | 28 ++++++++++++++++--- .../eventpipe/processinfo2/processinfo2.cs | 28 ++++++++++++++++--- 8 files changed, 56 insertions(+), 40 deletions(-) diff --git a/eng/testing/tests.mobile.targets b/eng/testing/tests.mobile.targets index 572213ee2c783..d264a9aadc44b 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 diff --git a/global.json b/global.json index d234281fc93b7..650a20f2711b6 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.21411.28", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "6.0.100-preview.6.21355.2" + "dotnet": "6.0.100-rc.1.21411.28" }, "native-tools": { "cmake": "3.16.4", 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 e00441d92e0cf..637ad3c321812 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.")] 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 2c2d79b4a1442..3b0fe6f160aff 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(); diff --git a/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs b/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs index 170344eda3ba6..2440bd34cc515 100644 --- a/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs +++ b/src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs @@ -259,12 +259,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); - } } } 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 adf5503a96e75..762ddff9f0cb7 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 diff --git a/src/tests/tracing/eventpipe/processinfo/processinfo.cs b/src/tests/tracing/eventpipe/processinfo/processinfo.cs index ebeb602e8f014..f6cbb2117c3cc 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,29 @@ 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 and remove + isArgument = true; + } + else if (isArgument) + { + 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 08a1082104118..31f4b677681c2 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,29 @@ 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 and remove + isArgument = true; + } + else if (isArgument) + { + 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.