Commit 96a257b8 authored by Benoit Lize's avatar Benoit Lize Committed by Commit Bot

android: re-enable a library_prefetcher test, expect for ASAN.

Bug: 570423
Change-Id: I8a64245abeaec3ea334345d0ae27e660c5d7d63f
Reviewed-on: https://chromium-review.googlesource.com/632623Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497353}
parent 7706ef67
......@@ -11,6 +11,7 @@
#include <vector>
#include "base/debug/proc_maps_linux.h"
#include "base/memory/shared_memory.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
......@@ -22,7 +23,6 @@ const uint8_t kReadPrivate = base::debug::MappedMemoryRegion::READ |
base::debug::MappedMemoryRegion::PRIVATE;
const uint8_t kExecutePrivate = base::debug::MappedMemoryRegion::EXECUTE |
base::debug::MappedMemoryRegion::PRIVATE;
const size_t kPageSize = 4096;
} // namespace
TEST(NativeLibraryPrefetcherTest, TestIsGoodToPrefetchNoRange) {
......@@ -96,6 +96,12 @@ TEST(NativeLibraryPrefetcherTest,
EXPECT_EQ(ranges[0].second, 0x7U);
}
// Fails with ASAN, crbug.com/570423.
#if !defined(ADDRESS_SANITIZER)
namespace {
const size_t kPageSize = 4096;
} // namespace
TEST(NativeLibraryPrefetcherTest, DISABLED_TestPercentageOfResidentCode) {
size_t length = 4 * kPageSize;
base::SharedMemory shared_mem;
......@@ -150,6 +156,7 @@ TEST(NativeLibraryPrefetcherTest,
munlock(address, length);
munlock(address2, length);
}
#endif // !defined(ADDRESS_SANITIZER)
} // namespace android
} // namespace base
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment