summaryrefslogtreecommitdiff
path: root/runtime/exec_utils_test.cc
diff options
context:
space:
mode:
author Roland Levillain <rpl@google.com> 2018-05-22 16:46:43 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-05-22 16:46:43 +0000
commitf31343f1eab771010b3f293366149d2524f30902 (patch)
tree5187b2bceee4c7d5347750dc6ba0020172d5ef51 /runtime/exec_utils_test.cc
parente816389b61d17b9a82d8e61426ddfcce20e1238c (diff)
parent8268cb677bd92bfbcfec7e803775c29687494e53 (diff)
Merge "Remove support for Valgrind in ART."
Diffstat (limited to 'runtime/exec_utils_test.cc')
-rw-r--r--runtime/exec_utils_test.cc24
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;
}