Loading libs/binder/tests/binderRpcTest.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -1125,7 +1125,7 @@ INSTANTIATE_TEST_CASE_P(Trusty, BinderRpc, ::testing::Values(true), ::testing::Values(true)), BinderRpc::PrintParamInfo); #else // BINDER_RPC_TO_TRUSTY_TEST static bool testSupportVsockLoopback() { bool testSupportVsockLoopback() { // We don't need to enable TLS to know if vsock is supported. unsigned int vsockPort = allocateVsockPort(); Loading Loading @@ -1225,7 +1225,15 @@ static std::vector<SocketType> testSocketTypes(bool hasPreconnected = true) { if (hasPreconnected) ret.push_back(SocketType::PRECONNECTED); #ifdef __BIONIC__ // Devices may not have vsock support. AVF tests will verify whether they do, but // we can't require it due to old kernels for the time being. static bool hasVsockLoopback = testSupportVsockLoopback(); #else // On host machines, we always assume we have vsock loopback. If we don't, the // subsequent failures will be more clear than showing one now. static bool hasVsockLoopback = true; #endif if (hasVsockLoopback) { ret.push_back(SocketType::VSOCK); Loading libs/binder/tests/binderRpcTestService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,8 @@ int main(int argc, char* argv[]) { CHECK_EQ(OK, server->setupRawSocketServer(std::move(socketFd))); break; case SocketType::VSOCK: CHECK_EQ(OK, server->setupVsockServer(VMADDR_CID_LOCAL, serverConfig.vsockPort)); CHECK_EQ(OK, server->setupVsockServer(VMADDR_CID_LOCAL, serverConfig.vsockPort)) << "Need `sudo modprobe vsock_loopback`?"; break; case SocketType::INET: { CHECK_EQ(OK, server->setupInetServer(kLocalInetAddress, 0, &outPort)); Loading Loading
libs/binder/tests/binderRpcTest.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -1125,7 +1125,7 @@ INSTANTIATE_TEST_CASE_P(Trusty, BinderRpc, ::testing::Values(true), ::testing::Values(true)), BinderRpc::PrintParamInfo); #else // BINDER_RPC_TO_TRUSTY_TEST static bool testSupportVsockLoopback() { bool testSupportVsockLoopback() { // We don't need to enable TLS to know if vsock is supported. unsigned int vsockPort = allocateVsockPort(); Loading Loading @@ -1225,7 +1225,15 @@ static std::vector<SocketType> testSocketTypes(bool hasPreconnected = true) { if (hasPreconnected) ret.push_back(SocketType::PRECONNECTED); #ifdef __BIONIC__ // Devices may not have vsock support. AVF tests will verify whether they do, but // we can't require it due to old kernels for the time being. static bool hasVsockLoopback = testSupportVsockLoopback(); #else // On host machines, we always assume we have vsock loopback. If we don't, the // subsequent failures will be more clear than showing one now. static bool hasVsockLoopback = true; #endif if (hasVsockLoopback) { ret.push_back(SocketType::VSOCK); Loading
libs/binder/tests/binderRpcTestService.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -139,7 +139,8 @@ int main(int argc, char* argv[]) { CHECK_EQ(OK, server->setupRawSocketServer(std::move(socketFd))); break; case SocketType::VSOCK: CHECK_EQ(OK, server->setupVsockServer(VMADDR_CID_LOCAL, serverConfig.vsockPort)); CHECK_EQ(OK, server->setupVsockServer(VMADDR_CID_LOCAL, serverConfig.vsockPort)) << "Need `sudo modprobe vsock_loopback`?"; break; case SocketType::INET: { CHECK_EQ(OK, server->setupInetServer(kLocalInetAddress, 0, &outPort)); Loading