From: Eric Wong Date: Tue, 20 Apr 2021 22:06:08 +0000 (+0000) Subject: t/lei-daemon: skip inaccessible socket test as root X-Git-Tag: v1.7.0~775 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=42bf77d28591740ac94e4e3d50661ae84c88ca5b;p=public-inbox.git t/lei-daemon: skip inaccessible socket test as root "chmod 0000" on a Unix socket can't stop root from connecting to it; so just skip the test for rare cases when testing as root. Reported-by: Konstantin Ryabitsev Link: https://public-inbox.org/meta/20210420213712.qfpftr2r543cqg7l@nitro.local/ --- diff --git a/t/lei-daemon.t b/t/lei-daemon.t index 35e059b9..84e2791d 100644 --- a/t/lei-daemon.t +++ b/t/lei-daemon.t @@ -74,7 +74,8 @@ test_lei({ daemon_only => 1 }, sub { chomp $lei_out; is($lei_out, $new_pid, 'PID unchanged after -0/-CHLD'); - if ('socket inaccessible') { + SKIP: { # socket inaccessible + skip "cannot test connect EPERM as root", 3 if $> == 0; 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');