From 4abfbbe94101276ce45c85182faf5bc15384823c Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 12 Dec 2020 19:44:10 -0500 Subject: [PATCH] [mac/arm] skip MappedMemoryTest that try to map w+x macOS/arm is w^x, so these tests don't work. Fixes these failures: LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndReleaseHuge/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.BasicWrite/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/4 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleWrite/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/5 LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/5 Part of PR46647. --- unittests/Support/MemoryTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unittests/Support/MemoryTest.cpp b/unittests/Support/MemoryTest.cpp index af33dc32c81..6e5f7472e45 100644 --- a/unittests/Support/MemoryTest.cpp +++ b/unittests/Support/MemoryTest.cpp @@ -41,6 +41,8 @@ bool IsMPROTECT() { err(EXIT_FAILURE, "sysctl"); return !!(paxflags & CTL_PROC_PAXFLAGS_MPROTECT); +#elif defined(__APPLE__) && defined(__aarch64__) + return true; #else return false; #endif