summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-03-08 18:09:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-08 18:09:18 +0000
commit26cf352637fd82623218cde318b4a6799d941fca (patch)
tree63a13954b5799a3c4253e1c86c73375336f50686
parent5417aa0cf50bc1d5f6ea5d27de8ad7ebfa878607 (diff)
parent5ccdfa63499ed8342bde875ead003ff90f336f19 (diff)
downloadsystem_core-26cf352637fd82623218cde318b4a6799d941fca.tar.gz
system_core-26cf352637fd82623218cde318b4a6799d941fca.tar.bz2
system_core-26cf352637fd82623218cde318b4a6799d941fca.zip
Merge "Don't fail if the new pss is less than stable."
-rw-r--r--libbacktrace/backtrace_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbacktrace/backtrace_test.cpp b/libbacktrace/backtrace_test.cpp
index b975db955..ab09564c7 100644
--- a/libbacktrace/backtrace_test.cpp
+++ b/libbacktrace/backtrace_test.cpp
@@ -1412,9 +1412,9 @@ void CheckForLeak(pid_t pid, pid_t tid) {
}
size_t new_pss = GetPssBytes();
ASSERT_TRUE(new_pss != 0);
- size_t abs_diff = (new_pss > stable_pss) ? new_pss - stable_pss : stable_pss - new_pss;
- // As long as the new pss is within a certain amount, consider everything okay.
- ASSERT_LE(abs_diff, MAX_LEAK_BYTES);
+ if (new_pss > stable_pss) {
+ ASSERT_LE(new_pss - stable_pss, MAX_LEAK_BYTES);
+ }
}
TEST(libbacktrace, check_for_leak_local) {