diff options
author | 2018-05-24 13:19:05 +0000 | |
---|---|---|
committer | 2018-06-11 14:03:37 +0100 | |
commit | 05e34f4cb8c9db165d1008721e874b9dd3db024b (patch) | |
tree | c41d397ef5cfb9d7918fceadcda3195a0d0d91de /runtime/exec_utils_test.cc | |
parent | 428d80e3a49f732b39bb0c71cfde26451e3fdf4d (diff) |
Revert^2 "Remove support for Valgrind in ART."
- Disable test configuration art-gtest-valgrind64
(art-gtest-valgrind32 was already disabled).
- Remove Makefile logic regarding testing with Valgrind.
- Remove occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_VALGRIND`.
- Replace occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_ASAN` with
`TEST_DISABLED_FOR_MEMORY_TOOL`.
- Replace the potentially dynamically evaluated
`RUNNING_ON_MEMORY_TOOL` expression with constant
`kRunningOnMemoryTool`.
- Simplify and fold the logic of
`art::ArenaAllocatorMemoryToolCheckImpl` and
`art::ArenaAllocatorMemoryToolCheck` into
`art::ArenaAllocatorMemoryTool`.
- Adjust comments regarding memory tools.
- Remove Valgrind suppression files.
- Remove `--callgrind` option from tools/art.
This reverts commit 8b362a87d52a6668ffd2283ef6ffc274315f41c8.
Change-Id: I23c76845e6ccf766f19b22b58a0d5161f60842a9
Test: art/test.py
Test: art/test/testrunner/run_build_test_target.py art-asan
Bug: 77856586
Bug: 29282211
Diffstat (limited to 'runtime/exec_utils_test.cc')
-rw-r--r-- | runtime/exec_utils_test.cc | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/runtime/exec_utils_test.cc b/runtime/exec_utils_test.cc index 68edfa8b72..a9c1ea2ae0 100644 --- a/runtime/exec_utils_test.cc +++ b/runtime/exec_utils_test.cc @@ -36,8 +36,10 @@ TEST_F(ExecUtilsTest, ExecSuccess) { command.push_back("/usr/bin/id"); } std::string error_msg; - if (!(RUNNING_ON_MEMORY_TOOL && kMemoryToolDetectsLeaks)) { - // Running on valgrind fails due to some memory that leaks in thread alternate signal stacks. + if (!(kRunningOnMemoryTool && kMemoryToolDetectsLeaks)) { + // Running on Valgrind fails due to some memory that leaks in thread alternate signal stacks. + // TODO: Valgrind is no longer supported, but Address Sanitizer is: + // check whether the following code works with ASan. EXPECT_TRUE(Exec(command, &error_msg)); } EXPECT_EQ(0U, error_msg.size()) << error_msg; @@ -50,8 +52,10 @@ TEST_F(ExecUtilsTest, ExecError) { std::vector<std::string> command; command.push_back("bogus"); std::string error_msg; - if (!(RUNNING_ON_MEMORY_TOOL && kMemoryToolDetectsLeaks)) { - // Running on valgrind fails due to some memory that leaks in thread alternate signal stacks. + if (!(kRunningOnMemoryTool && kMemoryToolDetectsLeaks)) { + // Running on Valgrind fails due to some memory that leaks in thread alternate signal stacks. + // TODO: Valgrind is no longer supported, but Address Sanitizer is: + // check whether the following code works with ASan. EXPECT_FALSE(Exec(command, &error_msg)); EXPECT_FALSE(error_msg.empty()); } @@ -72,8 +76,10 @@ TEST_F(ExecUtilsTest, EnvSnapshotAdditionsAreNotVisible) { } command.push_back(kModifiedVariable); std::string error_msg; - if (!(RUNNING_ON_MEMORY_TOOL && kMemoryToolDetectsLeaks)) { - // Running on valgrind fails due to some memory that leaks in thread alternate signal stacks. + if (!(kRunningOnMemoryTool && kMemoryToolDetectsLeaks)) { + // Running on Valgrind fails due to some memory that leaks in thread alternate signal stacks. + // TODO: Valgrind is no longer supported, but Address Sanitizer is: + // check whether the following code works with ASan. EXPECT_FALSE(Exec(command, &error_msg)); EXPECT_NE(0U, error_msg.size()) << error_msg; } @@ -97,8 +103,10 @@ TEST_F(ExecUtilsTest, EnvSnapshotDeletionsAreNotVisible) { } command.push_back(kDeletedVariable); std::string error_msg; - if (!(RUNNING_ON_MEMORY_TOOL && kMemoryToolDetectsLeaks)) { - // Running on valgrind fails due to some memory that leaks in thread alternate signal stacks. + if (!(kRunningOnMemoryTool && kMemoryToolDetectsLeaks)) { + // Running on Valgrind fails due to some memory that leaks in thread alternate signal stacks. + // TODO: Valgrind is no longer supported, but Address Sanitizer is: + // check whether the following code works with ASan. EXPECT_TRUE(Exec(command, &error_msg)); EXPECT_EQ(0U, error_msg.size()) << error_msg; } |