diff options
author | 2016-11-23 10:10:19 -0800 | |
---|---|---|
committer | 2016-11-23 10:10:19 -0800 | |
commit | 543d3a35b31cb500dc54e619ec013a0cea1263e4 (patch) | |
tree | a63c5f02d5868a8916a08bc545ddacdce7ec6fb3 /test/core | |
parent | 74ce59485f340d18a54dd6a134a05db22fdfa4fe (diff) | |
parent | 42909c58fb1337a1020186fa9c4e7dca7f400959 (diff) |
Merge pull request #8650 from kpayson64/poll_cv_improvement
Bypass poll thread if wakeup fd is set
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/iomgr/wakeup_fd_cv_test.c | 7 |
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); |