diff options
| author | 2023-03-01 22:54:25 +0000 | |
|---|---|---|
| committer | 2023-03-01 22:54:25 +0000 | |
| commit | 85ee080eef10fca1fd8ec422b94a44d19468ed97 (patch) | |
| tree | 93f4971648dca15f300deef7f58714de7bff2245 /libs | |
| parent | 66754725725a9c949a032388e1405f7c7b8236a9 (diff) | |
| parent | c5acea5884be9ab2f755caab42870d3e4a7e9f74 (diff) | |
Merge "libbinder: Flush pending messages in OnewayCallQueuingWithFds" am: 109d1d4b94 am: c5acea5884
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2455763
Change-Id: I6d9b7d016e59db64b47cdc601d6ff83970d2a7d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/tests/binderRpcTest.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/tests/binderRpcTest.cpp b/libs/binder/tests/binderRpcTest.cpp index 84c93ddc30..dcea880ef9 100644 --- a/libs/binder/tests/binderRpcTest.cpp +++ b/libs/binder/tests/binderRpcTest.cpp @@ -544,6 +544,8 @@ TEST_P(BinderRpc, OnewayCallQueueingWithFds) { GTEST_SKIP() << "This test requires multiple threads"; } + constexpr size_t kNumServerThreads = 3; + // This test forces a oneway transaction to be queued by issuing two // `blockingSendFdOneway` calls, then drains the queue by issuing two // `blockingRecvFd` calls. @@ -552,7 +554,7 @@ TEST_P(BinderRpc, OnewayCallQueueingWithFds) { // https://developer.android.com/reference/android/os/IBinder#FLAG_ONEWAY auto proc = createRpcTestSocketServerProcess({ - .numThreads = 3, + .numThreads = kNumServerThreads, .clientFileDescriptorTransportMode = RpcSession::FileDescriptorTransportMode::UNIX, .serverSupportedFileDescriptorTransportModes = {RpcSession::FileDescriptorTransportMode::UNIX}, @@ -573,6 +575,8 @@ TEST_P(BinderRpc, OnewayCallQueueingWithFds) { EXPECT_OK(proc.rootIface->blockingRecvFd(&fdB)); CHECK(android::base::ReadFdToString(fdB.get(), &result)); EXPECT_EQ(result, "b"); + + saturateThreadPool(kNumServerThreads, proc.rootIface); } TEST_P(BinderRpc, OnewayCallQueueing) { |