diff options
| author | 2019-07-15 17:54:11 -0700 | |
|---|---|---|
| committer | 2019-07-15 18:06:16 -0700 | |
| commit | 3d79be886912aa32399049da8df8dea3052581cc (patch) | |
| tree | f7e0347f4d6450d6b1d822b6176f098b0c36825d /libs | |
| parent | 67591ab43bb6637c17ec1a37b3766669697dc40d (diff) | |
libbinder: delete tests for linkToDeath w/ no ref
These tests succeeded before because of a circular reference that held
onto a binder when it was linked to death. Now that this circular link
is broken, these tests fail.
Bug: 137587622
Bug: 137212433
Test: binderLibTest
Change-Id: Iaf150012d8883b642c9b3cd065d4a2299cbffb79
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/tests/binderLibTest.cpp | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp index 99a71bd662..cf83faa8cf 100644 --- a/libs/binder/tests/binderLibTest.cpp +++ b/libs/binder/tests/binderLibTest.cpp @@ -550,50 +550,6 @@ TEST_F(BinderLibTest, AddServer) ASSERT_TRUE(server != nullptr); } -TEST_F(BinderLibTest, DeathNotificationNoRefs) -{ - status_t ret; - - sp<TestDeathRecipient> testDeathRecipient = new TestDeathRecipient(); - - { - sp<IBinder> binder = addServer(); - ASSERT_TRUE(binder != nullptr); - ret = binder->linkToDeath(testDeathRecipient); - EXPECT_EQ(NO_ERROR, ret); - } - IPCThreadState::self()->flushCommands(); - ret = testDeathRecipient->waitEvent(5); - EXPECT_EQ(NO_ERROR, ret); -#if 0 /* Is there an unlink api that does not require a strong reference? */ - ret = binder->unlinkToDeath(testDeathRecipient); - EXPECT_EQ(NO_ERROR, ret); -#endif -} - -TEST_F(BinderLibTest, DeathNotificationWeakRef) -{ - status_t ret; - wp<IBinder> wbinder; - - sp<TestDeathRecipient> testDeathRecipient = new TestDeathRecipient(); - - { - sp<IBinder> binder = addServer(); - ASSERT_TRUE(binder != nullptr); - ret = binder->linkToDeath(testDeathRecipient); - EXPECT_EQ(NO_ERROR, ret); - wbinder = binder; - } - IPCThreadState::self()->flushCommands(); - ret = testDeathRecipient->waitEvent(5); - EXPECT_EQ(NO_ERROR, ret); -#if 0 /* Is there an unlink api that does not require a strong reference? */ - ret = binder->unlinkToDeath(testDeathRecipient); - EXPECT_EQ(NO_ERROR, ret); -#endif -} - TEST_F(BinderLibTest, DeathNotificationStrongRef) { status_t ret; |