diff options
author | Eric Wong <e@80x24.org> | 2019-11-27 01:33:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-27 10:25:41 +0000 |
commit | 1e44ee6d429b853a7a87ae58e56241c55ab8c306 (patch) | |
tree | f9365f9a457cfa261a1a65fe4da5af3ff4db1fe7 /t/ds-poll.t | |
parent | d462440b512629fd8ef444ce105477fcab2ae6b1 (diff) | |
download | public-inbox-1e44ee6d429b853a7a87ae58e56241c55ab8c306.tar.gz |
Oops, IO::KQueue support was broken due to this missing constant. Add a new ds-kqxs.t test case to ensure we test the IO::KQueue path if IO::KQueue is available.
Diffstat (limited to 't/ds-poll.t')
-rw-r--r-- | t/ds-poll.t | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/t/ds-poll.t b/t/ds-poll.t index c9dcdd22..21f8b295 100644 --- a/t/ds-poll.t +++ b/t/ds-poll.t @@ -7,7 +7,7 @@ use strict; use warnings; use Test::More; use PublicInbox::Syscall qw(:epoll); -my $cls = 'PublicInbox::DSPoll'; +my $cls = $ENV{TEST_IOPOLLER} // 'PublicInbox::DSPoll'; use_ok $cls; my $p = $cls->new; @@ -43,16 +43,8 @@ my @fds = sort(map { $_->[0] } @$events); my @exp = sort((fileno($r), fileno($x))); is_deeply(\@fds, \@exp, 'got both ready FDs'); -# EPOLL_CTL_DEL doesn't matter for kqueue, we do it in native epoll -# to avoid a kernel-wide lock; but its not needed for native kqueue -# paths so DSKQXS makes it a noop (as did Danga::Socket::close). -SKIP: { - if ($cls ne 'PublicInbox::DSPoll') { - skip "$cls doesn't handle EPOLL_CTL_DEL", 2; - } - is($p->epoll_ctl(EPOLL_CTL_DEL, fileno($r), 0), 0, 'EPOLL_CTL_DEL OK'); - $n = $p->epoll_wait(9, 0, $events); - is($n, 0, 'nothing ready after EPOLL_CTL_DEL'); -}; +is($p->epoll_ctl(EPOLL_CTL_DEL, fileno($r), 0), 0, 'EPOLL_CTL_DEL OK'); +$n = $p->epoll_wait(9, 0, $events); +is($n, 0, 'nothing ready after EPOLL_CTL_DEL'); done_testing; |