summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-07-22 18:41:22 +0000
committerReid Kleckner <rnk@google.com>2016-07-22 18:41:22 +0000
commitff3ea5f4f8b51d7cf2156c3aca0a6b176da7ba34 (patch)
treeb2d72334ec035531588c2e9ea40c95f31372b86f /compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
parentf432c9cefa1bc43a33560aae8617cc5640864747 (diff)
downloadbcm5719-llvm-ff3ea5f4f8b51d7cf2156c3aca0a6b176da7ba34.tar.gz
bcm5719-llvm-ff3ea5f4f8b51d7cf2156c3aca0a6b176da7ba34.zip
Try to fix more Windows portability issues in sanitizer tests
Add a %stdcxx11 lit substitution for -std=c++11. Windows defaults to -std=c++14 when VS 2015 is used because the STL requires it. Harcoding -std=c++11 in the ASan tests actually downgrades the C++ standard level, leading to test failures. Relax a FileCheck pattern in use-after-scope-types.cc. Disable the sanitizer_common OOM tests. They fail on bots with low swap, and cause other concurrently running tests to OOM. llvm-svn: 276454
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
index 76c00e4f4f9..c9d360947b1 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
@@ -335,7 +335,9 @@ void FailInAssertionOnOOM() {
a.TestOnlyUnmap();
}
-#if SANITIZER_CAN_USE_ALLOCATOR64
+// Don't test OOM conditions on Win64 because it causes other tests on the same
+// machine to OOM.
+#if SANITIZER_CAN_USE_ALLOCATOR64 && !SANITIZER_WINDOWS64
TEST(SanitizerCommon, SizeClassAllocator64Overflow) {
EXPECT_DEATH(FailInAssertionOnOOM<Allocator64>(), "Out of memory");
}
@@ -777,7 +779,9 @@ TEST(SanitizerCommon, LargeMmapAllocatorBlockBegin) {
}
-#if SANITIZER_CAN_USE_ALLOCATOR64
+// Don't test OOM conditions on Win64 because it causes other tests on the same
+// machine to OOM.
+#if SANITIZER_CAN_USE_ALLOCATOR64 && !SANITIZER_WINDOWS64
// Regression test for out-of-memory condition in PopulateFreeList().
TEST(SanitizerCommon, SizeClassAllocator64PopulateFreeListOOM) {
// In a world where regions are small and chunks are huge...
OpenPOWER on IntegriCloud