diff options
Diffstat (limited to 'tests/malloc_test.cpp')
-rw-r--r-- | tests/malloc_test.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp index 8d5db540f..a5cc34a2a 100644 --- a/tests/malloc_test.cpp +++ b/tests/malloc_test.cpp @@ -94,7 +94,7 @@ TEST(malloc, calloc_overflow) { } TEST(malloc, memalign_multiple) { - SKIP_WITH_HWASAN; // hwasan requires power of 2 alignment. + SKIP_WITH_HWASAN << "hwasan requires power of 2 alignment"; // Memalign test where the alignment is any value. for (size_t i = 0; i <= 12; i++) { for (size_t alignment = 1 << i; alignment < (1U << (i+1)); alignment++) { @@ -532,24 +532,24 @@ TEST(malloc, mallopt_smoke) { TEST(malloc, mallopt_decay) { #if defined(__BIONIC__) - SKIP_WITH_HWASAN; // hwasan does not implement mallopt + SKIP_WITH_HWASAN << "hwasan does not implement mallopt"; errno = 0; ASSERT_EQ(1, mallopt(M_DECAY_TIME, 1)); ASSERT_EQ(1, mallopt(M_DECAY_TIME, 0)); ASSERT_EQ(1, mallopt(M_DECAY_TIME, 1)); ASSERT_EQ(1, mallopt(M_DECAY_TIME, 0)); #else - GTEST_LOG_(INFO) << "This tests a bionic implementation detail.\n"; + GTEST_SKIP() << "bionic-only test"; #endif } TEST(malloc, mallopt_purge) { #if defined(__BIONIC__) - SKIP_WITH_HWASAN; // hwasan does not implement mallopt + SKIP_WITH_HWASAN << "hwasan does not implement mallopt"; errno = 0; ASSERT_EQ(1, mallopt(M_PURGE, 0)); #else - GTEST_LOG_(INFO) << "This tests a bionic implementation detail.\n"; + GTEST_SKIP() << "bionic-only test"; #endif } @@ -567,7 +567,7 @@ TEST(malloc, reallocarray_overflow) { ASSERT_TRUE(reallocarray(nullptr, b, a) == nullptr); ASSERT_EQ(ENOMEM, errno); #else - GTEST_LOG_(INFO) << "This test requires a C library with reallocarray.\n"; + GTEST_SKIP() << "reallocarray not available"; #endif } @@ -577,13 +577,13 @@ TEST(malloc, reallocarray) { ASSERT_TRUE(p != nullptr); ASSERT_GE(malloc_usable_size(p), 64U); #else - GTEST_LOG_(INFO) << "This test requires a C library with reallocarray.\n"; + GTEST_SKIP() << "reallocarray not available"; #endif } TEST(malloc, mallinfo) { #if defined(__BIONIC__) - SKIP_WITH_HWASAN; // hwasan does not implement mallinfo + SKIP_WITH_HWASAN << "hwasan does not implement mallinfo"; static size_t sizes[] = { 8, 32, 128, 4096, 32768, 131072, 1024000, 10240000, 20480000, 300000000 }; @@ -622,7 +622,7 @@ TEST(malloc, mallinfo) { << kMaxAllocs << " allocations."; } #else - GTEST_LOG_(INFO) << "Host glibc does not pass this test, skipping.\n"; + GTEST_SKIP() << "glibc is broken"; #endif } @@ -633,7 +633,7 @@ TEST(android_mallopt, error_on_unexpected_option) { EXPECT_EQ(false, android_mallopt(unrecognized_option, nullptr, 0)); EXPECT_EQ(ENOTSUP, errno); #else - GTEST_LOG_(INFO) << "This tests a bionic implementation detail.\n"; + GTEST_SKIP() << "bionic-only test"; #endif } @@ -679,7 +679,7 @@ TEST(android_mallopt, init_zygote_child_profiling) { EXPECT_EQ(ENOTSUP, errno); } #else - GTEST_LOG_(INFO) << "This tests a bionic implementation detail.\n"; + GTEST_SKIP() << "bionic-only test"; #endif } |