summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Richard Neill <richard.neill@arm.com> 2025-01-06 15:32:07 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-01-23 05:37:15 -0800
commitd3345673912218130552a0e9d17032bdb0a4fdbd (patch)
treeb7c01ee51a3cf2ef990d7c1c0e483d198a4dba5d
parent7345dfdec5abce522226383af1b95850faeee1ad (diff)
Skip MapAnonymousFailNullError on host
This test relies on the system's mmap_min_addr configuration being high enough that the test's mmap will fail. However, some hosts may set this to a value which allows for all possible values to be successfully mapped, breaking the test. Therefore, skip on host. Test: test.py --gtest --host Change-Id: I86fc0721c9575ffa38b1ad8bc402bfe29d23cf02
-rw-r--r--libartbase/base/mem_map_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/libartbase/base/mem_map_test.cc b/libartbase/base/mem_map_test.cc
index 2c63539803..b3da8fbf52 100644
--- a/libartbase/base/mem_map_test.cc
+++ b/libartbase/base/mem_map_test.cc
@@ -354,6 +354,10 @@ TEST_F(MemMapTest, MapAnonymousEmpty) {
}
TEST_F(MemMapTest, MapAnonymousFailNullError) {
+ // Host system's mmap_min_addr configuration could allow for arbitrarily low addresses to be
+ // successfully mapped, breaking the expectation that the MapAnonymous call should fail.
+ TEST_DISABLED_FOR_HOST();
+
CommonInit();
uint8_t* invalid_page[16]; // Use this address as mmap hint address.
const size_t page_size = MemMap::GetPageSize();