libsync: tests: redefine PollOnDestroyedTimeline()

On mainline if the sw_sync timeline is destroyed the fences doesn't not
signal or error. So change the test to check if the fence is still there
by polling the fence with timeout zero and asserting if it is not
signalled.

Test: Sync unit tests still passes.
Change-Id: Icb8e629018eef35074ae91d0f29ed1f12e90492b
This commit is contained in:
Gustavo Padovan 2016-12-06 16:13:17 -02:00 committed by Dmitry Shmidt
parent e4682802cb
commit 801492b8a6

View file

@ -364,8 +364,7 @@ TEST(FenceTest, PollOnDestroyedTimeline) {
struct pollfd fds;
fds.fd = fenceKill.getFd();
fds.events = POLLIN | POLLERR;
ASSERT_EQ(poll(&fds, 1, -1), 1);
ASSERT_TRUE(fds.revents & POLLERR);
ASSERT_EQ(poll(&fds, 1, 0), 0);
}
};