From 29ebba12cf19d91edbf78acd09ae97ae1a65f180 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 22 Jul 2016 18:41:22 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276454 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/tests/sanitizer_allocator_test.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/sanitizer_common/tests') diff --git a/lib/sanitizer_common/tests/sanitizer_allocator_test.cc b/lib/sanitizer_common/tests/sanitizer_allocator_test.cc index 76c00e4f4..c9d360947 100644 --- a/lib/sanitizer_common/tests/sanitizer_allocator_test.cc +++ b/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(), "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... -- cgit v1.2.3