]> Sergey Matveev's repositories - public-inbox.git/commitdiff
test_common: avoid uninitialized warning on readlink
authorEric Wong <e@80x24.org>
Sat, 9 Jul 2022 08:08:57 +0000 (08:08 +0000)
committerEric Wong <e@80x24.org>
Sat, 9 Jul 2022 23:28:48 +0000 (23:28 +0000)
Of course, waiting for inotify to become active can't rely on
inotify, so we need to do a busy loop here, instead...

lib/PublicInbox/TestCommon.pm

index 943dd2fa9d111c85f1222a9e853264af20bb4205..ecf7a261b6f485447dce78ca6f10fd74660f4201 100644 (file)
@@ -378,7 +378,7 @@ sub wait_for_tail {
                my @ino;
                do {
                        @ino = grep {
-                               readlink($_) =~ /\binotify\b/
+                               (readlink($_) // '') =~ /\binotify\b/
                        } glob("/proc/$tail_pid/fd/*");
                } while (!@ino && time <= $end and tick);
                return if !@ino;