RPC Binder: Update check in binderRpcTestTrusty
Fix assertion on numIncomingThreads being all zeroes
in Trusty in binderRpcTestTrusty, since Trusty does not
support client-side incoming connections due to lack
of threading.
Bug: N/A
Test: com.android.trusty.binderRpcTest
Change-Id: I3320d9928645a2ecf0d0c4d3ea83e78a8ba0fbc0
diff --git a/libs/binder/tests/binderRpcTestTrusty.cpp b/libs/binder/tests/binderRpcTestTrusty.cpp
index 85794bd..a6bed15 100644
--- a/libs/binder/tests/binderRpcTestTrusty.cpp
+++ b/libs/binder/tests/binderRpcTestTrusty.cpp
@@ -60,9 +60,10 @@
// threads.
std::unique_ptr<ProcessSession> BinderRpc::createRpcTestSocketServerProcessEtc(
const BinderRpcOptions& options) {
- LOG_ALWAYS_FATAL_IF(options.numIncomingConnectionsBySession.size() != 0,
- "Non-zero incoming connections %zu on Trusty",
- options.numIncomingConnectionsBySession.size());
+ LOG_ALWAYS_FATAL_IF(std::any_of(options.numIncomingConnectionsBySession.begin(),
+ options.numIncomingConnectionsBySession.end(),
+ [](size_t n) { return n != 0; }),
+ "Non-zero incoming connections on Trusty");
uint32_t clientVersion = std::get<2>(GetParam());
uint32_t serverVersion = std::get<3>(GetParam());