From 42bf77d28591740ac94e4e3d50661ae84c88ca5b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 20 Apr 2021 22:06:08 +0000 Subject: 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/ --- t/lei-daemon.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'); -- cgit v1.2.3-24-ge0c7