summaryrefslogtreecommitdiff
path: root/tests/stdlib_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-01-30 13:52:36 -0800
committerElliott Hughes <enh@google.com>2019-01-30 13:52:36 -0800
commit18181e6a0a55bb8778e82b5fbc0f7090380ea87d (patch)
tree756a68e1676145785fcd7e4be1643ba9a31c118c /tests/stdlib_test.cpp
parentccc0922653904525147b670f0aa25aa85c0d2022 (diff)
Updates for glibc 2.17.
Bug: http://b/111358231 Test: builds Change-Id: I542b2a9acc74261ad12b78e4add0f3ae77c3656c
Diffstat (limited to 'tests/stdlib_test.cpp')
-rw-r--r--tests/stdlib_test.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/tests/stdlib_test.cpp b/tests/stdlib_test.cpp
index a249b759f..408a9c704 100644
--- a/tests/stdlib_test.cpp
+++ b/tests/stdlib_test.cpp
@@ -36,14 +36,6 @@
#include "math_data_test.h"
#include "utils.h"
-#if defined(__BIONIC__)
- #define ALIGNED_ALLOC_AVAILABLE 1
-#elif defined(__GLIBC_PREREQ)
- #if __GLIBC_PREREQ(2, 16)
- #define ALIGNED_ALLOC_AVAILABLE 1
- #endif
-#endif
-
template <typename T = int (*)(char*)>
class GenericTemporaryFile {
public:
@@ -274,7 +266,6 @@ TEST(stdlib, posix_memalign_overflow) {
TEST(stdlib, aligned_alloc_sweep) {
SKIP_WITH_HWASAN;
-#if defined(ALIGNED_ALLOC_AVAILABLE)
// Verify powers of 2 up to 2048 allocate, and verify that all other
// alignment values between the powers of 2 fail.
size_t last_align = 1;
@@ -292,31 +283,20 @@ TEST(stdlib, aligned_alloc_sweep) {
free(ptr);
last_align = align;
}
-#else
- GTEST_LOG_(INFO) << "This test requires a C library that has aligned_alloc.\n";
-#endif
}
TEST(stdlib, aligned_alloc_overflow) {
SKIP_WITH_HWASAN;
-#if defined(ALIGNED_ALLOC_AVAILABLE)
ASSERT_TRUE(aligned_alloc(16, SIZE_MAX) == nullptr);
-#else
- GTEST_LOG_(INFO) << "This test requires a C library that has aligned_alloc.\n";
-#endif
}
TEST(stdlib, aligned_alloc_size_not_multiple_of_alignment) {
SKIP_WITH_HWASAN;
-#if defined(ALIGNED_ALLOC_AVAILABLE)
for (size_t size = 1; size <= 2048; size++) {
void* ptr = aligned_alloc(2048, size);
ASSERT_TRUE(ptr != nullptr) << "Failed at size " << std::to_string(size);
free(ptr);
}
-#else
- GTEST_LOG_(INFO) << "This test requires a C library that has aligned_alloc.\n";
-#endif
}
TEST(stdlib, realpath__NULL_filename) {