diff options
Diffstat (limited to 't/lei-daemon.t')
-rw-r--r-- | t/lei-daemon.t | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/t/lei-daemon.t b/t/lei-daemon.t index e11105bc..d97e494a 100644 --- a/t/lei-daemon.t +++ b/t/lei-daemon.t @@ -2,7 +2,7 @@ # Copyright (C) all contributors <meta@public-inbox.org> # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt> use strict; use v5.10.1; use PublicInbox::TestCommon; -use Socket qw(AF_UNIX SOCK_SEQPACKET MSG_EOR pack_sockaddr_un); +use Socket qw(AF_UNIX SOCK_SEQPACKET pack_sockaddr_un); test_lei({ daemon_only => 1 }, sub { my $send_cmd = PublicInbox::Spawn->can('send_cmd4') // do { @@ -21,6 +21,7 @@ test_lei({ daemon_only => 1 }, sub { is($lei_err, '', 'no error from daemon-pid'); like($lei_out, qr/\A[0-9]+\n\z/s, 'pid returned') or BAIL_OUT; chomp(my $pid = $lei_out); + no_pollerfd($pid); ok(kill(0, $pid), 'pid is valid'); ok(-S $sock, 'sock created'); is(-s $err_log, 0, 'nothing in errors.log'); @@ -31,7 +32,7 @@ test_lei({ daemon_only => 1 }, sub { SKIP: { skip 'only testing open files on Linux', 1 if $^O ne 'linux'; my $d = "/proc/$pid/fd"; - skip "no $d on Linux" unless -d $d; + skip "no $d on Linux", 1 unless -d $d; my @before = sort(glob("$d/*")); my $addr = pack_sockaddr_un($sock); open my $null, '<', '/dev/null' or BAIL_OUT "/dev/null: $!"; @@ -40,7 +41,7 @@ test_lei({ daemon_only => 1 }, sub { socket(my $c, AF_UNIX, SOCK_SEQPACKET, 0) or BAIL_OUT "socket: $!"; connect($c, $addr) or BAIL_OUT "connect: $!"; - $send_cmd->($c, \@fds, 'hi', MSG_EOR); + $send_cmd->($c, \@fds, 'hi', 0); } lei_ok('daemon-pid'); chomp($pid = $lei_out); |