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

Commit 9dc99840 authored by Parth Sane's avatar Parth Sane
Browse files

Fix Libbinder RemoveFromCacheOnServerDeath test

Get pid before killing the server

Test: atest binderCacheUnitTest
Bug: 333854840
Flag: Exempt Bugfix
Change-Id: I7d07c34e89867920f03545557eb51d4c307ec357
parent 69ec43c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -137,9 +137,9 @@ TEST_F(LibbinderCacheTest, RemoveFromCacheOnServerDeath) {
    ASSERT_EQ(binder1, result);

    // Kill the server, this should remove from cache.
    foo.killServer(binder1);
    pid_t pid;
    ASSERT_EQ(OK, binder1->getDebugPid(&pid));
    foo.killServer(binder1);
    system(("kill -9 " + std::to_string(pid)).c_str());

    sp<IBinder> binder2 = sp<BBinder>::make();