summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2018-06-19 18:10:55 +0000
committer Roland Levillain <rpl@google.com> 2018-06-20 11:28:27 +0100
commitab4326e544d6af5005a216918c6b4eb153a4e3de (patch)
tree7821a105f3ef8019f7c6973eae6b0e3b430d80df
parent02fe4ed7dabdde8d2bf8375cc6eb2556caca215e (diff)
Revert^2 "Re-enable some more ART gtests when running under ASan."
Some tests in heap_verification_test and runtime_callbacks_test were disabled when running under a memory tool, but they seem to work fine when run under AddressSanitizer on host (but without heap poisoning for most of them). They were presubmably disabled because of issues with Valgrind. Enable them (depending on the test, sometimes only when heap poisoning is off), as Valgrind support has been dropped from ART. This reverts commit 0794a520ad2dbca3b186c332025367a97d107226. Change-Id: I8efd32f8a7ce949a6afae0210329853a2a087e5c Test: SANITIZE_HOST=address ASAN_OPTIONS='detect_leaks=0' make test-art-host-gtest-heap_verification_test Test: SANITIZE_HOST=address ASAN_OPTIONS='detect_leaks=0' make test-art-host-gtest-runtime_callbacks_test Test: ART_HEAP_POISONING=true ART_USE_READ_BARRIER=false SANITIZE_HOST=address ASAN_OPTIONS='detect_leaks=0' make test-art-host-gtest-heap_verification_test Test: ART_HEAP_POISONING=true ART_USE_READ_BARRIER=false SANITIZE_HOST=address ASAN_OPTIONS='detect_leaks=0' make test-art-host-gtest-runtime_callbacks_test Bug: 29282211 Bug: 62448488
-rw-r--r--libartbase/base/common_art_test.h6
-rw-r--r--runtime/gc/heap_verification_test.cc7
-rw-r--r--runtime/runtime_callbacks_test.cc3
3 files changed, 9 insertions, 7 deletions
diff --git a/libartbase/base/common_art_test.h b/libartbase/base/common_art_test.h
index d9bea3d97a..0ace09de1a 100644
--- a/libartbase/base/common_art_test.h
+++ b/libartbase/base/common_art_test.h
@@ -222,4 +222,10 @@ using CommonArtTestWithParam = CommonArtTestBase<testing::TestWithParam<Param>>;
}
} // namespace art
+#define TEST_DISABLED_FOR_MEMORY_TOOL_WITH_HEAP_POISONING() \
+ if (kRunningOnMemoryTool && kPoisonHeapReferences) { \
+ printf("WARNING: TEST DISABLED FOR MEMORY TOOL WITH HEAP POISONING\n"); \
+ return; \
+ }
+
#endif // ART_LIBARTBASE_BASE_COMMON_ART_TEST_H_
diff --git a/runtime/gc/heap_verification_test.cc b/runtime/gc/heap_verification_test.cc
index 38695332bb..6caca84854 100644
--- a/runtime/gc/heap_verification_test.cc
+++ b/runtime/gc/heap_verification_test.cc
@@ -83,7 +83,7 @@ TEST_F(VerificationTest, IsValidClassOrNotInHeap) {
}
TEST_F(VerificationTest, IsValidClassInHeap) {
- TEST_DISABLED_FOR_MEMORY_TOOL();
+ TEST_DISABLED_FOR_MEMORY_TOOL_WITH_HEAP_POISONING();
ScopedObjectAccess soa(Thread::Current());
VariableSizedHandleScope hs(soa.Self());
Handle<mirror::String> string(
@@ -106,7 +106,7 @@ TEST_F(VerificationTest, DumpInvalidObjectInfo) {
}
TEST_F(VerificationTest, DumpValidObjectInfo) {
- TEST_DISABLED_FOR_MEMORY_TOOL();
+ TEST_DISABLED_FOR_MEMORY_TOOL_WITH_HEAP_POISONING();
ScopedLogSeverity sls(LogSeverity::INFO);
ScopedObjectAccess soa(Thread::Current());
Runtime* const runtime = Runtime::Current();
@@ -126,7 +126,7 @@ TEST_F(VerificationTest, DumpValidObjectInfo) {
}
TEST_F(VerificationTest, LogHeapCorruption) {
- TEST_DISABLED_FOR_MEMORY_TOOL();
+ TEST_DISABLED_FOR_MEMORY_TOOL_WITH_HEAP_POISONING();
ScopedLogSeverity sls(LogSeverity::INFO);
ScopedObjectAccess soa(Thread::Current());
Runtime* const runtime = Runtime::Current();
@@ -147,7 +147,6 @@ TEST_F(VerificationTest, LogHeapCorruption) {
}
TEST_F(VerificationTest, FindPathFromRootSet) {
- TEST_DISABLED_FOR_MEMORY_TOOL();
ScopedLogSeverity sls(LogSeverity::INFO);
ScopedObjectAccess soa(Thread::Current());
Runtime* const runtime = Runtime::Current();
diff --git a/runtime/runtime_callbacks_test.cc b/runtime/runtime_callbacks_test.cc
index 54769f9c49..794ac19c4b 100644
--- a/runtime/runtime_callbacks_test.cc
+++ b/runtime/runtime_callbacks_test.cc
@@ -339,9 +339,6 @@ class RuntimeSigQuitCallbackRuntimeCallbacksTest : public RuntimeCallbacksTest {
};
TEST_F(RuntimeSigQuitCallbackRuntimeCallbacksTest, SigQuit) {
- // SigQuit induces a dump. ASan isn't happy with libunwind reading memory.
- TEST_DISABLED_FOR_MEMORY_TOOL();
-
// The runtime needs to be started for the signal handler.
Thread* self = Thread::Current();