about summary refs log tree commit homepage
path: root/t/lei-watch.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-31 11:21:21 +0000
committerEric Wong <e@80x24.org>2021-08-31 11:29:10 +0000
commita5990c69ff5a2e075d21e862033659707f2507a3 (patch)
treef9957c129ec78bb9a47e1a4cac6fc8ddd779fbd1 /t/lei-watch.t
parent7f8d7e22ca8b6d1a5499f8782f7f05020d7d3b95 (diff)
downloadpublic-inbox-a5990c69ff5a2e075d21e862033659707f2507a3.tar.gz
Open file handles in lei-daemon may be unstable so we need to
account for readlink() returning undef.
Diffstat (limited to 't/lei-watch.t')
-rw-r--r--t/lei-watch.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/lei-watch.t b/t/lei-watch.t
index 86fa6649..a881fbb9 100644
--- a/t/lei-watch.t
+++ b/t/lei-watch.t
@@ -25,7 +25,7 @@ test_lei(sub {
                 lei_ok 'daemon-pid'; chomp(my $pid = $lei_out);
                 skip 'missing /proc/$PID/fd', 1 if !-d "/proc/$pid/fd";
                 my @ino = grep {
-                        readlink($_) =~ /\binotify\b/
+                        (readlink($_) // '') =~ /\binotify\b/
                 } glob("/proc/$pid/fd/*");
                 is(scalar(@ino), 1, 'only one inotify FD');
                 my $ino_fd = (split('/', $ino[0]))[-1];