summaryrefslogtreecommitdiff
path: root/oatdump/oatdump_app_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-03-12 13:30:42 +0000
committer Vladimir Marko <vmarko@google.com> 2018-03-12 13:30:42 +0000
commit0530bccdc6e79d6015d16cb868444a19004f3bf9 (patch)
treed7600eb236fba4fb7a0448594e880d3a64b43dd5 /oatdump/oatdump_app_test.cc
parent9992e095643f6746361df03c4c98e742d9ad5899 (diff)
Fix oatdump_app_test for address sanitizer.
Pass -Xmx64M to dex2oat to reduce the memory allocation as the test was failing to allocate the default 512MiB heap area for certain address sanitation configs. Test: SANITIZE_HOST=address ASAN_OPTIONS=detect_leaks=0 \ ART_HEAP_POISONING=true ART_USE_READ_BARRIER=false \ m test-art-host-gtest-oatdump_app_test Bug: 74378710 Change-Id: I74503df6e98a113a86a938150d69399c9eead306
Diffstat (limited to 'oatdump/oatdump_app_test.cc')
-rw-r--r--oatdump/oatdump_app_test.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/oatdump/oatdump_app_test.cc b/oatdump/oatdump_app_test.cc
index f12522277b..34b07d2ddf 100644
--- a/oatdump/oatdump_app_test.cc
+++ b/oatdump/oatdump_app_test.cc
@@ -20,25 +20,29 @@ namespace art {
TEST_F(OatDumpTest, TestAppWithBootImage) {
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {}, &error_msg)) << error_msg;
+ ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M"}, &error_msg)) << error_msg;
ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestAppWithBootImageStatic) {
TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kStatic, {}, &error_msg)) << error_msg;
+ ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M"}, &error_msg)) << error_msg;
ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestPicAppWithBootImage) {
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--compile-pic"}, &error_msg)) << error_msg;
+ ASSERT_TRUE(
+ GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}, &error_msg))
+ << error_msg;
ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}
TEST_F(OatDumpTest, TestPicAppWithBootImageStatic) {
TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
std::string error_msg;
- ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--compile-pic"}, &error_msg)) << error_msg;
+ ASSERT_TRUE(
+ GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}, &error_msg))
+ << error_msg;
ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode, &error_msg)) << error_msg;
}