aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2016-11-06 20:06:12 -0800
committerGravatar Ken Payson <kpayson@google.com>2016-11-06 20:06:12 -0800
commit42909c58fb1337a1020186fa9c4e7dca7f400959 (patch)
tree21cdc288c62271c29a4a5f57d5f24b6428bb283d /test/core
parent4736c55e0f923b8f3b8713449500a43ab8686ae3 (diff)
Bypass poll thread if wakeup fd is set
Diffstat (limited to 'test/core')
-rw-r--r--test/core/iomgr/wakeup_fd_cv_test.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/core/iomgr/wakeup_fd_cv_test.c b/test/core/iomgr/wakeup_fd_cv_test.c
index 82452d2157..04ae9376dd 100644
--- a/test/core/iomgr/wakeup_fd_cv_test.c
+++ b/test/core/iomgr/wakeup_fd_cv_test.c
@@ -195,16 +195,15 @@ void test_poll_cv_trigger(void) {
GPR_ASSERT(pfds[4].revents == 0);
GPR_ASSERT(pfds[5].revents == 0);
- // Pollin on wakeup fd + socket fd
- trigger_socket_event();
+ // Pollin on wakeupfd before poll()
pargs.result = -2;
gpr_thd_new(&t_id, &background_poll, &pargs, &opt);
gpr_thd_join(t_id);
- GPR_ASSERT(pargs.result == 2);
+ GPR_ASSERT(pargs.result == 1);
GPR_ASSERT(pfds[0].revents == 0);
GPR_ASSERT(pfds[1].revents == POLLIN);
- GPR_ASSERT(pfds[2].revents == POLLIN);
+ GPR_ASSERT(pfds[2].revents == 0);
GPR_ASSERT(pfds[3].revents == 0);
GPR_ASSERT(pfds[4].revents == 0);
GPR_ASSERT(pfds[5].revents == 0);