[libc-commits] [PATCH] D134552: [libc][obvious] disable mprotect test under sanitizers

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Sep 23 10:05:29 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG736e215ca783: [libc][obvious] disable mprotect test under sanitizers (authored by michaelrj).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134552/new/

https://reviews.llvm.org/D134552

Files:
  libc/test/src/sys/mman/linux/CMakeLists.txt
  libc/test/src/sys/mman/linux/mprotect_test.cpp


Index: libc/test/src/sys/mman/linux/mprotect_test.cpp
===================================================================
--- libc/test/src/sys/mman/linux/mprotect_test.cpp
+++ libc/test/src/sys/mman/linux/mprotect_test.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "include/signal.h"
 #include "src/sys/mman/mmap.h"
 #include "src/sys/mman/mprotect.h"
 #include "src/sys/mman/munmap.h"
@@ -14,6 +13,7 @@
 #include "utils/UnitTest/Test.h"
 
 #include <errno.h>
+#include <signal.h>
 #include <sys/mman.h>
 
 using __llvm_libc::testing::ErrnoSetterMatcher::Fails;
Index: libc/test/src/sys/mman/linux/CMakeLists.txt
===================================================================
--- libc/test/src/sys/mman/linux/CMakeLists.txt
+++ libc/test/src/sys/mman/linux/CMakeLists.txt
@@ -15,22 +15,24 @@
     libc.test.errno_setter_matcher
 )
 
-add_libc_unittest(
-  mprotect_test
-  SUITE
-    libc_sys_mman_unittests
-  SRCS
-    mprotect_test.cpp
-  DEPENDS
-    libc.include.errno
-    libc.include.sys_mman
-    libc.include.signal
-    libc.src.errno.errno
-    libc.src.sys.mman.mmap
-    libc.src.sys.mman.munmap
-    libc.src.sys.mman.mprotect
-    libc.test.errno_setter_matcher
-)
+if (NOT LLVM_USE_SANITIZER)
+  add_libc_unittest(
+    mprotect_test
+    SUITE
+      libc_sys_mman_unittests
+    SRCS
+      mprotect_test.cpp
+    DEPENDS
+      libc.include.errno
+      libc.include.sys_mman
+      libc.include.signal
+      libc.src.errno.errno
+      libc.src.sys.mman.mmap
+      libc.src.sys.mman.munmap
+      libc.src.sys.mman.mprotect
+      libc.test.errno_setter_matcher
+  )
+endif()
 
 add_libc_unittest(
   madvise_test


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134552.462540.patch
Type: text/x-patch
Size: 1715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220923/12c8eea9/attachment.bin>


More information about the libc-commits mailing list