From 2387892317672b404dfaa0b46405b632f1f7976f Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Thu, 5 Aug 2021 21:07:23 +0300 Subject: [PATCH] Disable tests on MacCatalyst (#56826) Due to lack of execute permissions --- .../tests/MemoryMappedViewAccessor.Tests.cs | 3 +-- .../System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream.Tests.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs index b4db65b..8f7e2fa 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs @@ -75,7 +75,6 @@ namespace System.IO.MemoryMappedFiles.Tests [InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.CopyOnWrite)] [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.Read)] [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.CopyOnWrite)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/53601", runtimes: TestRuntimes.Mono, platforms: TestPlatforms.MacCatalyst)] public void ValidAccessLevelCombinations(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess) { const int Capacity = 4096; @@ -92,7 +91,7 @@ namespace System.IO.MemoryMappedFiles.Tests } catch (UnauthorizedAccessException) { - if ((OperatingSystem.IsMacOS() || PlatformDetection.IsInContainer) && + if ((OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst() || PlatformDetection.IsInContainer) && (viewAccess == MemoryMappedFileAccess.ReadExecute || viewAccess == MemoryMappedFileAccess.ReadWriteExecute)) { // Containers and OSX with SIP enabled do not have execute permissions by default. diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream.Tests.cs b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream.Tests.cs index a29a5bf..d77a24a 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream.Tests.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewStream.Tests.cs @@ -75,7 +75,6 @@ namespace System.IO.MemoryMappedFiles.Tests [InlineData(MemoryMappedFileAccess.ReadWrite, MemoryMappedFileAccess.CopyOnWrite)] [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.Read)] [InlineData(MemoryMappedFileAccess.Read, MemoryMappedFileAccess.CopyOnWrite)] - [ActiveIssue("https://github.com/dotnet/runtime/issues/53601", runtimes: TestRuntimes.Mono, platforms: TestPlatforms.MacCatalyst)] public void ValidAccessLevelCombinations(MemoryMappedFileAccess mapAccess, MemoryMappedFileAccess viewAccess) { const int Capacity = 4096; @@ -92,7 +91,7 @@ namespace System.IO.MemoryMappedFiles.Tests } catch (UnauthorizedAccessException) { - if ((OperatingSystem.IsMacOS() || PlatformDetection.IsInContainer) && + if ((OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst() || PlatformDetection.IsInContainer) && (viewAccess == MemoryMappedFileAccess.ReadExecute || viewAccess == MemoryMappedFileAccess.ReadWriteExecute)) { // Containers and OSX with SIP enabled do not have execute permissions by default. -- 2.7.4