From 42909c58fb1337a1020186fa9c4e7dca7f400959 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Sun, 6 Nov 2016 20:06:12 -0800 Subject: Bypass poll thread if wakeup fd is set --- test/core/iomgr/wakeup_fd_cv_test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/core') 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); -- cgit v1.2.3