Skip to content

[unittest] Skip W+X MappedMemoryTests on OpenBSD #89102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Apr 17, 2024

OpenBSD uses W^X so the tests will not work.

OpenBSD uses W^X so the tests will not work.
@llvmbot
Copy link
Member

llvmbot commented Apr 17, 2024

@llvm/pr-subscribers-llvm-support

Author: Brad Smith (brad0)

Changes

OpenBSD uses W^X so the tests will not work.


Full diff: https://github.com/llvm/llvm-project/pull/89102.diff

1 Files Affected:

  • (modified) llvm/unittests/Support/MemoryTest.cpp (+1-1)
diff --git a/llvm/unittests/Support/MemoryTest.cpp b/llvm/unittests/Support/MemoryTest.cpp
index 0164492829ccd7..9daa6d0ff9e4dd 100644
--- a/llvm/unittests/Support/MemoryTest.cpp
+++ b/llvm/unittests/Support/MemoryTest.cpp
@@ -40,7 +40,7 @@ bool IsMPROTECT() {
     err(EXIT_FAILURE, "sysctl");
 
   return !!(paxflags & CTL_PROC_PAXFLAGS_MPROTECT);
-#elif defined(__APPLE__) && defined(__aarch64__)
+#elif (defined(__APPLE__) && defined(__aarch64__)) || defined(__OpenBSD__)
   return true;
 #else
   return false;

@brad0 brad0 requested review from nico and mgorny April 17, 2024 18:51
Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brad0 brad0 merged commit fbca90b into llvm:main Apr 18, 2024
5 of 6 checks passed
@brad0 brad0 deleted the llvm_unittests_memorytest_openbsd branch April 18, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants