[compiler-rt] r210962 - Exclude Android from the tests for valloc/pvalloc.

Dan Albert danalbert at google.com
Fri Jun 13 17:50:04 PDT 2014


Author: danalbert
Date: Fri Jun 13 19:50:03 2014
New Revision: 210962

URL: http://llvm.org/viewvc/llvm-project?rev=210962&view=rev
Log:
Exclude Android from the tests for valloc/pvalloc.

These functions are being removed from Android because they were removed
from POSIX 2004.

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

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=210962&r1=210961&r2=210962&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Fri Jun 13 19:50:03 2014
@@ -116,7 +116,8 @@ TEST(AddressSanitizer, CallocReturnsZero
   }
 }
 
-#if !defined(_WIN32)  // No valloc on Windows.
+// No valloc on Windows or Android.
+#if !defined(_WIN32) && !defined(ANDROID) && !defined(__ANDROID__)
 TEST(AddressSanitizer, VallocTest) {
   void *a = valloc(100);
   EXPECT_EQ(0U, (uintptr_t)a % kPageSize);

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_test_utils.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_test_utils.h?rev=210962&r1=210961&r2=210962&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_test_utils.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_test_utils.h Fri Jun 13 19:50:03 2014
@@ -101,7 +101,8 @@ static inline uint32_t my_rand() {
 # define SANITIZER_TEST_HAS_POSIX_MEMALIGN 0
 #endif
 
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(ANDROID) && \
+    !defined(__ANDROID__) && !defined(_WIN32)
 # define SANITIZER_TEST_HAS_MEMALIGN 1
 # define SANITIZER_TEST_HAS_PVALLOC 1
 # define SANITIZER_TEST_HAS_MALLOC_USABLE_SIZE 1





More information about the llvm-commits mailing list