From bebeb57cc9bdc1e35125866c0b57f2ac0666e3d5 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 31 Jan 2022 13:07:08 -0800 Subject: [PATCH 1/4] Update mac Helix queues --- .../coreclr/templates/helix-queues-setup.yml | 11 +++++------ eng/pipelines/libraries/helix-queues-setup.yml | 11 ++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/eng/pipelines/coreclr/templates/helix-queues-setup.yml b/eng/pipelines/coreclr/templates/helix-queues-setup.yml index 0b2e6f7f80ed2a..0c3151159daecd 100644 --- a/eng/pipelines/coreclr/templates/helix-queues-setup.yml +++ b/eng/pipelines/coreclr/templates/helix-queues-setup.yml @@ -29,7 +29,7 @@ jobs: # iOS/tvOS simulator x64/x86 - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'tvOSSimulator_x64') }}: - - OSX.1015.Amd64.Open + - OSX.1200.Amd64.Open # Android arm64 - ${{ if in(parameters.platform, 'Android_arm64') }}: @@ -106,17 +106,16 @@ jobs: # OSX arm64 - ${{ if eq(parameters.platform, 'OSX_arm64') }}: - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(parameters.jobParameters.helixQueueGroup, 'pr', 'ci', 'libraries')) }}: - - OSX.1100.ARM64.Open + - OSX.1200.ARM64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - OSX.1100.ARM64 + - OSX.1200.ARM64 # OSX x64 - ${{ if eq(parameters.platform, 'OSX_x64') }}: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - OSX.1014.Amd64.Open + - OSX.1200.Amd64.Open - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - OSX.1014.Amd64 - - OSX.1015.Amd64 + - OSX.1200.Amd64 # windows x64 - ${{ if eq(parameters.platform, 'windows_x64') }}: diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index f82e09c9e0a124..9f8fee2cc288a6 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -91,14 +91,11 @@ jobs: # OSX arm64 - ${{ if eq(parameters.platform, 'OSX_arm64') }}: - - OSX.1100.ARM64.Open + - OSX.1200.ARM64.Open # OSX x64 - ${{ if eq(parameters.platform, 'OSX_x64') }}: - - ${{ if or(eq(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - OSX.1014.Amd64.Open - - ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}: - - OSX.1015.Amd64.Open + - OSX.1200.Amd64.Open # Android - ${{ if in(parameters.platform, 'Android_x86', 'Android_x64') }}: @@ -108,11 +105,11 @@ jobs: # iOS Simulator/Mac Catalyst arm64 - ${{ if in(parameters.platform, 'MacCatalyst_arm64', 'iOSSimulator_arm64') }}: - - OSX.1100.ARM64.Open + - OSX.1200.ARM64.Open # iOS/tvOS simulator x64/x86 & MacCatalyst x64 - ${{ if in(parameters.platform, 'iOSSimulator_x64', 'iOSSimulator_x86', 'tvOSSimulator_x64', 'MacCatalyst_x64') }}: - - OSX.1015.Amd64.Open + - OSX.1200.Amd64.Open # iOS devices - ${{ if in(parameters.platform, 'iOS_arm64') }}: From 0293e67f6a5bc558e9f0b301198b127e50260b53 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Mon, 31 Jan 2022 16:35:34 -0800 Subject: [PATCH 2/4] Adjust test to account for Mac RID changes --- .../System.Runtime.Extensions/tests/System/EnvironmentTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs index 8c6fc1a78d47bf..7ec508517e01cb 100644 --- a/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs +++ b/src/libraries/System.Runtime.Extensions/tests/System/EnvironmentTests.cs @@ -190,7 +190,8 @@ public void OSVersion_ValidVersion_OSX() Version version = Environment.OSVersion.Version; // verify that the Environment.OSVersion.Version matches the current RID - Assert.Contains(version.ToString(2), RuntimeInformation.RuntimeIdentifier); + // As of 12.0, only major version numbers are included in the RID + Assert.Contains(version.ToString(1), RuntimeInformation.RuntimeIdentifier); Assert.True(version.Build >= 0, "OSVersion Build should be non-negative"); Assert.Equal(-1, version.Revision); // Revision is never set on OSX From c5b86d17c2345498663ad13f343c5aa165239646 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 2 Feb 2022 12:34:32 -0800 Subject: [PATCH 3/4] Disable DllImport probing test on Mac --- .../DllImportPath/DllImportPathTest.cs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/tests/Interop/DllImportAttribute/DllImportPath/DllImportPathTest.cs b/src/tests/Interop/DllImportAttribute/DllImportPath/DllImportPathTest.cs index c83295d89292a4..86d5098bf9fbda 100644 --- a/src/tests/Interop/DllImportAttribute/DllImportPath/DllImportPathTest.cs +++ b/src/tests/Interop/DllImportAttribute/DllImportPath/DllImportPathTest.cs @@ -52,7 +52,7 @@ class Test [DllImport(UnicodeFileName, EntryPoint = "GetZero")] private static extern int GetZero_Unicode(); - + [DllImport(PathEnvFileName, EntryPoint = "GetZero")] private static extern int GetZero_PathEnv(); @@ -83,7 +83,7 @@ static void TestNativeLibraryProbingOnRelativePath() bool isWindows = OperatingSystem.IsWindows(); if (!isWindows) // We need to ensure that the subdirectory exists for off-Windows. - { + { var currentDirectory = Directory.GetCurrentDirectory(); var info = new DirectoryInfo(currentDirectory); info.CreateSubdirectory(RelativeSubdirectoryName); @@ -97,12 +97,12 @@ static void TestNativeLibraryProbingOnRelativePath() { GetZero_Relative1Unix(); } - + if (OperatingSystem.IsWindows()) { GetZero_Relative2(); } - + if (isWindows) { GetZero_Relative3Windows(); @@ -150,7 +150,7 @@ private static void SetupUnicodeTest() localFile.Extension == ".dll" || localFile.Extension == ".so" || localFile.Extension == ".dylib"); - + var unicodeFileLocation = file.FullName.Replace("DllImportPath_Local", UnicodeFileName); file.CopyTo(unicodeFileLocation, true); @@ -178,7 +178,11 @@ public static int Main(string[] args) { TestNativeLibraryProbingUnicode(); } - TestNativeLibraryProbingOnPathEnv(); + // Setting LD_LIBRARY_PATH/DYLD_LIBRARY_PATH may not be allowed on Mac + if (!OperatingSystem.IsMacOS()) + { + TestNativeLibraryProbingOnPathEnv(); + } if (OperatingSystem.IsWindows()) { TestNativeExeProbing(); From d69b5b929197f10bfd8b4f51cbfb5843c9004c17 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Thu, 3 Feb 2022 12:26:21 -0800 Subject: [PATCH 4/4] Disable profiler.multiple on Mac --- src/tests/profiler/multiple/multiple.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/profiler/multiple/multiple.cs b/src/tests/profiler/multiple/multiple.cs index 9de72d96198054..aa0388fa0eb293 100644 --- a/src/tests/profiler/multiple/multiple.cs +++ b/src/tests/profiler/multiple/multiple.cs @@ -16,7 +16,7 @@ class MultiplyLoaded [DllImport("Profiler")] private static extern void PassCallbackToProfiler(ProfilerCallback callback); - public static int RunTest(String[] args) + public static int RunTest(String[] args) { ManualResetEvent _profilerDone = new ManualResetEvent(false); PassCallbackToProfiler(() => _profilerDone.Set()); @@ -45,6 +45,11 @@ public static int RunTest(String[] args) public static int Main(string[] args) { + // failing on MacOs 12 https://github.com/dotnet/runtime/issues/64765 + if (OperatingSystem.IsMacOS()) + { + return 100; + } if (args.Length > 0 && args[0].Equals("RunTest", StringComparison.OrdinalIgnoreCase)) { return RunTest(args);