summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2023-07-26 01:22:28 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-07-26 01:22:28 +0000
commit2b2bb45a80efe39c4eecf9bd59bd559de752c7de (patch)
tree9072b7a3b5fb67b8fea64d324d486b575e8eed39
parent9ed13f95602ee2bb252eca07a9f770931300b75b (diff)
parentfad628bc6fda7b591315e870ed778038e300c0d2 (diff)
Merge "binderAllocationLimits: check remote binder null" into main am: 4061f7300d am: fad628bc6f
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2670077 Change-Id: Ibbd682cba3cfa9d2169c299e8a8fa5dcd0026ce1 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/binder/tests/binderAllocationLimits.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/binder/tests/binderAllocationLimits.cpp b/libs/binder/tests/binderAllocationLimits.cpp
index bc40864020..6712c9cece 100644
--- a/libs/binder/tests/binderAllocationLimits.cpp
+++ b/libs/binder/tests/binderAllocationLimits.cpp
@@ -216,16 +216,16 @@ TEST(RpcBinderAllocation, SetupRpcServer) {
auto server = RpcServer::make();
server->setRootObject(sp<BBinder>::make());
- CHECK_EQ(OK, server->setupUnixDomainServer(addr.c_str()));
+ ASSERT_EQ(OK, server->setupUnixDomainServer(addr.c_str()));
std::thread([server]() { server->join(); }).detach();
- status_t status;
auto session = RpcSession::make();
- status = session->setupUnixDomainClient(addr.c_str());
- CHECK_EQ(status, OK) << "Could not connect: " << addr << ": " << statusToString(status).c_str();
+ status_t status = session->setupUnixDomainClient(addr.c_str());
+ ASSERT_EQ(status, OK) << "Could not connect: " << addr << ": " << statusToString(status).c_str();
auto remoteBinder = session->getRootObject();
+ ASSERT_NE(remoteBinder, nullptr);
size_t mallocs = 0, totalBytes = 0;
{
@@ -233,7 +233,7 @@ TEST(RpcBinderAllocation, SetupRpcServer) {
mallocs++;
totalBytes += bytes;
});
- CHECK_EQ(OK, remoteBinder->pingBinder());
+ ASSERT_EQ(OK, remoteBinder->pingBinder());
}
EXPECT_EQ(mallocs, 1);
EXPECT_EQ(totalBytes, 40);