Skip to content

Commit

Permalink
Upgrade SDK to 6.0.100-rc.1.21411.13 (#57143)
Browse files Browse the repository at this point in the history
* 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 #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 <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
Co-authored-by: Andy Gocke <[email protected]>
Co-authored-by: John Salem <[email protected]>
Co-authored-by: Dan Moseley <[email protected]>
  • Loading branch information
6 people authored Aug 12, 2021
1 parent 145c55f commit 7d12f75
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 40 deletions.
2 changes: 1 addition & 1 deletion eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
AssemblyFile="$(RuntimeConfigParserTasksAssemblyPath)"
Condition="'$(RuntimeConfigParserTasksAssemblyPath)' != ''" />

<Target Name="GenerateRuntimeConfig" Condition="'$(OutputType)' != 'library' and '$(TargetOS)' != 'Browser'">
<Target Name="GenerateRuntimeConfig" Condition="'$(TargetOS)' != 'Browser'">
<PropertyGroup>
<RuntimeConfigFilePath>$(PublishDir)$(AssemblyName).runtimeconfig.json</RuntimeConfigFilePath>
<ParsedRuntimeConfigFilePath>$(PublishDir)runtimeconfig.bin</ParsedRuntimeConfigFilePath>
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down
7 changes: 0 additions & 7 deletions src/libraries/System.Runtime.Loader/tests/ApplyUpdateTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<!-- these tests depend on the pdb files. Causes test failures like:
[FAIL] System.Text.Json.Tests.DebuggerTests.DefaultJsonElement -->
<DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
<!-- Needed for JsonSerializerOptionsUpdateHandler tests -->
<MetadataUpdaterSupport Condition="'$(MetadataUpdaterSupport)' == '' and '$(TargetOS)' == 'Browser'">true</MetadataUpdaterSupport>
<WasmXHarnessArgs>$(WasmXHarnessArgs) --timeout=1800</WasmXHarnessArgs>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
Expand Down
28 changes: 24 additions & 4 deletions src/tests/tracing/eventpipe/processinfo/processinfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
28 changes: 24 additions & 4 deletions src/tests/tracing/eventpipe/processinfo2/processinfo2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 7d12f75

Please sign in to comment.