[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:02:16 PDT 2022
michaelrj created this revision.
michaelrj added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.
fixes a build failure in my previous patch
Repository:
rG LLVM Github Monorepo
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.462538.patch
Type: text/x-patch
Size: 1715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220923/79847678/attachment.bin>
More information about the libc-commits
mailing list