X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fds-poll.t;h=3771059bb6ecb32edf30fcac17d359005a079337;hb=e39585ee2bdcbeaab7b6bd33b3568021042d0879;hp=c9dcdd22cf86607f5905cc2981785b15d14deef7;hpb=7d7e5013e3d2e56c48735698e39890e8f67b6b56;p=public-inbox.git diff --git a/t/ds-poll.t b/t/ds-poll.t index c9dcdd22..3771059b 100644 --- a/t/ds-poll.t +++ b/t/ds-poll.t @@ -1,4 +1,4 @@ -# Copyright (C) 2019 all contributors +# Copyright (C) 2019-2020 all contributors # Licensed the same as Danga::Socket (and Perl5) # License: GPL-1.0+ or Artistic-1.0-Perl # @@ -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;