summaryrefslogtreecommitdiffstats
path: root/libsync
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.com>2016-12-06 16:13:17 -0200
committerDmitry Shmidt <dimitrysh@google.com>2017-01-17 14:29:41 -0800
commit801492b8a66a8f08f99667a4123ce07aa4c0a4f7 (patch)
tree0e2178b062d36bd70952d97b8f82ea17a79ffe21 /libsync
parente4682802cbeeefe8e870e5b7b110515659a6a14f (diff)
downloadsystem_core-801492b8a66a8f08f99667a4123ce07aa4c0a4f7.tar.gz
system_core-801492b8a66a8f08f99667a4123ce07aa4c0a4f7.tar.bz2
system_core-801492b8a66a8f08f99667a4123ce07aa4c0a4f7.zip
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
Diffstat (limited to 'libsync')
-rw-r--r--libsync/tests/sync_test.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/libsync/tests/sync_test.cpp b/libsync/tests/sync_test.cpp
index 7c65756f0..ff8a300f1 100644
--- a/libsync/tests/sync_test.cpp
+++ b/libsync/tests/sync_test.cpp
@@ -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);
}
};