Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59f60fd4 authored by Elie Kheirallah's avatar Elie Kheirallah
Browse files

binderLibTest HangingServices and ThreadPoolAvailableThreads fix

Changed reply to local reply for threads.

Bug: 235494189
Test: adb shell /data/nativetest64/binderLibTest/binderLibTest // over 50 runs
Change-Id: Ie1ceeebdd3e77a6f678bb16c8cc0585917ac02ee
parent c56d0ecb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1264,7 +1264,9 @@ TEST_F(BinderLibTest, ThreadPoolAvailableThreads) {
    std::vector<std::thread> ts;
    for (size_t i = 0; i < kKernelThreads - 1; i++) {
        ts.push_back(std::thread([&] {
            EXPECT_THAT(server->transact(BINDER_LIB_TEST_LOCK_UNLOCK, data, &reply), NO_ERROR);
            Parcel local_reply;
            EXPECT_THAT(server->transact(BINDER_LIB_TEST_LOCK_UNLOCK, data, &local_reply),
                        NO_ERROR);
        }));
    }

@@ -1302,7 +1304,9 @@ TEST_F(BinderLibTest, HangingServices) {
    size_t epochMsBefore = epochMillis();
    for (size_t i = 0; i < kKernelThreads + 1; i++) {
        ts.push_back(std::thread([&] {
            EXPECT_THAT(server->transact(BINDER_LIB_TEST_LOCK_UNLOCK, data, &reply), NO_ERROR);
            Parcel local_reply;
            EXPECT_THAT(server->transact(BINDER_LIB_TEST_LOCK_UNLOCK, data, &local_reply),
                        NO_ERROR);
        }));
    }