summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan2016-12-06 12:13:17 -0600
committerDmitry Shmidt2017-01-17 16:29:41 -0600
commit801492b8a66a8f08f99667a4123ce07aa4c0a4f7 (patch)
tree0e2178b062d36bd70952d97b8f82ea17a79ffe21 /libsync
parente4682802cbeeefe8e870e5b7b110515659a6a14f (diff)
downloadplatform-system-core-801492b8a66a8f08f99667a4123ce07aa4c0a4f7.tar.gz
platform-system-core-801492b8a66a8f08f99667a4123ce07aa4c0a4f7.tar.xz
platform-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) {
364 struct pollfd fds; 364 struct pollfd fds;
365 fds.fd = fenceKill.getFd(); 365 fds.fd = fenceKill.getFd();
366 fds.events = POLLIN | POLLERR; 366 fds.events = POLLIN | POLLERR;
367 ASSERT_EQ(poll(&fds, 1, -1), 1); 367 ASSERT_EQ(poll(&fds, 1, 0), 0);
368 ASSERT_TRUE(fds.revents & POLLERR);
369 } 368 }
370 }; 369 };
371 370