X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Flei-daemon.t;h=b60c7ce6dc4aa8277219c10e33d676d9c39162bb;hb=9cd6f106919076285c3dcc0d48977d6b39c33ede;hp=35e059b97cd956b8df20531ed98ad5ab0cb54de0;hpb=69175b02c000d3ff5f03e5a88701468f121af4b6;p=public-inbox.git diff --git a/t/lei-daemon.t b/t/lei-daemon.t index 35e059b9..b60c7ce6 100644 --- a/t/lei-daemon.t +++ b/t/lei-daemon.t @@ -3,7 +3,6 @@ # License: AGPL-3.0+ use strict; use v5.10.1; use PublicInbox::TestCommon; use Socket qw(AF_UNIX SOCK_SEQPACKET MSG_EOR pack_sockaddr_un); -use PublicInbox::Spawn qw(which); test_lei({ daemon_only => 1 }, sub { my $send_cmd = PublicInbox::Spawn->can('send_cmd4') // do { @@ -21,14 +20,9 @@ test_lei({ daemon_only => 1 }, sub { ok(kill(0, $pid), 'pid is valid'); ok(-S $sock, 'sock created'); is(-s $err_log, 0, 'nothing in errors.log'); - open my $efh, '>>', $err_log or BAIL_OUT $!; - print $efh "phail\n" or BAIL_OUT $!; - close $efh or BAIL_OUT $!; - lei_ok('daemon-pid'); chomp(my $pid_again = $lei_out); is($pid, $pid_again, 'daemon-pid idempotent'); - like($lei_err, qr/phail/, 'got mock "phail" error previous run'); SKIP: { skip 'only testing open files on Linux', 1 if $^O ne 'linux'; @@ -73,14 +67,6 @@ test_lei({ daemon_only => 1 }, sub { lei_ok('daemon-pid'); chomp $lei_out; is($lei_out, $new_pid, 'PID unchanged after -0/-CHLD'); - - if ('socket inaccessible') { - chmod 0000, $sock or BAIL_OUT "chmod 0000: $!"; - lei_ok('help', \'connect fail, one-shot fallback works'); - like($lei_err, qr/\bconnect\(/, 'connect error noted'); - like($lei_out, qr/^usage: /, 'help output works'); - chmod 0700, $sock or BAIL_OUT "chmod 0700: $!"; - } unlink $sock or BAIL_OUT "unlink($sock) $!"; for (0..100) { kill('CHLD', $new_pid) or last;