diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/tests/Android.bp | 1 | ||||
| -rw-r--r-- | libs/binder/tests/binderRpcTest.cpp | 26 |
2 files changed, 2 insertions, 25 deletions
diff --git a/libs/binder/tests/Android.bp b/libs/binder/tests/Android.bp index 2a3658e2f5..a44cddf761 100644 --- a/libs/binder/tests/Android.bp +++ b/libs/binder/tests/Android.bp @@ -122,7 +122,6 @@ cc_test { ], test_suites: ["general-tests"], require_root: true, - host_supported: true, } cc_test { diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp index 936ee5e91a..985a3014d4 100644 --- a/libs/binder/tests/binderRpcTest.cpp +++ b/libs/binder/tests/binderRpcTest.cpp @@ -30,10 +30,7 @@ #include <iostream> #include <thread> -#ifdef __BIONIC__ #include <linux/vm_sockets.h> -#endif //__BIONIC__ - #include <sys/prctl.h> #include <unistd.h> @@ -189,13 +186,8 @@ private: static std::string allocateSocketAddress() { static size_t id = 0; - static bool gUseTmp = access("/tmp/", F_OK) != -1; - if (gUseTmp) { - return "/tmp/binderRpcTest_" + std::to_string(id++); - } else { - return "/dev/binderRpcTest_" + std::to_string(id++); - } + return "/dev/binderRpcTest_" + std::to_string(id++); }; struct ProcessConnection { @@ -249,18 +241,14 @@ struct BinderRpcTestProcessConnection { enum class SocketType { UNIX, -#ifdef __BIONIC__ VSOCK, -#endif // __BIONIC__ }; static inline std::string PrintSocketType(const testing::TestParamInfo<SocketType>& info) { switch (info.param) { case SocketType::UNIX: return "unix_domain_socket"; -#ifdef __BIONIC__ case SocketType::VSOCK: return "vm_socket"; -#endif // __BIONIC__ default: LOG_ALWAYS_FATAL("Unknown socket type"); return ""; @@ -295,11 +283,9 @@ public: case SocketType::UNIX: CHECK(connection->setupUnixDomainServer(addr.c_str())) << addr; break; -#ifdef __BIONIC__ case SocketType::VSOCK: CHECK(connection->setupVsockServer(port)); break; -#endif // __BIONIC__ default: LOG_ALWAYS_FATAL("Unknown socket type"); } @@ -325,11 +311,9 @@ public: case SocketType::UNIX: if (ret.connection->addUnixDomainClient(addr.c_str())) goto success; break; -#ifdef __BIONIC__ case SocketType::VSOCK: if (ret.connection->addVsockClient(VMADDR_CID_LOCAL, port)) goto success; break; -#endif // __BIONIC__ default: LOG_ALWAYS_FATAL("Unknown socket type"); } @@ -807,13 +791,7 @@ TEST_P(BinderRpc, Fds) { } INSTANTIATE_TEST_CASE_P(PerSocket, BinderRpc, - ::testing::Values(SocketType::UNIX -#ifdef __BIONIC__ - , - SocketType::VSOCK -#endif // __BIONIC__ - ), - PrintSocketType); + ::testing::Values(SocketType::UNIX, SocketType::VSOCK), PrintSocketType); } // namespace android |