[compiler-rt] r308254 - [asan] Remove recent asan tests which expect death in allocator

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 18:39:56 PDT 2017


Author: vitalybuka
Date: Mon Jul 17 18:39:56 2017
New Revision: 308254

URL: http://llvm.org/viewvc/llvm-project?rev=308254&view=rev
Log:
[asan] Remove recent asan tests which expect death in allocator

These tests assume allocator_may_return_null=false
If allocator_may_return_null=true, gtest would not be able to switch it.
Tests needs to be re-implemented as lit tests.

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=308254&r1=308253&r2=308254&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Mon Jul 17 18:39:56 2017
@@ -82,13 +82,6 @@ TEST(AddressSanitizer, VariousMallocsTes
   EXPECT_EQ(0, pm_res);
   EXPECT_NE(nullptr, pm);
   free(pm);
-
-  // Alignment is not a power of 2.
-  EXPECT_DEATH(posix_memalign(&pm, 3, kPageSize),
-               "allocator is terminating the process instead of returning 0");
-  // Alignment is a power of 2, but not a multiple of size(void *).
-  EXPECT_DEATH(posix_memalign(&pm, 2, kPageSize),
-               "allocator is terminating the process instead of returning 0");
 #endif  // SANITIZER_TEST_HAS_POSIX_MEMALIGN
 
 #if SANITIZER_TEST_HAS_MEMALIGN
@@ -96,9 +89,6 @@ TEST(AddressSanitizer, VariousMallocsTes
   EXPECT_EQ(0U, (uintptr_t)ma % kPageSize);
   ma[123] = 0;
   free(ma);
-
-  EXPECT_DEATH(memalign(3, kPageSize),
-               "allocator is terminating the process instead of returning 0");
 #endif  // SANITIZER_TEST_HAS_MEMALIGN
 }
 




More information about the llvm-commits mailing list