]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-watch.t
t/lei-watch: add diagnostics for failure
[public-inbox.git] / t / lei-watch.t
index 86fa66493920d47c575335a4ede49ce7196f183d..9158571c60cc75bfa3d458021c5939a0a441651c 100644 (file)
@@ -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];
@@ -58,7 +58,7 @@ test_lei(sub {
        lei_ok qw(q mid:testmessage@example.com -o), $md2, '-I', "$ro_home/t1";
        my @f2 = glob("$md2/*/*");
        is(scalar(@f2), 1, 'got one result');
-       like($f2[0], qr/S\z/, 'seen set from rename');
+       like($f2[0], qr/S\z/, 'seen set from rename') or diag explain(\@f2);
        my $e2 = eml_load($f2[0]);
        my $e1 = eml_load("$f[0]S");
        is_deeply($e2, $e1, 'results match');
@@ -91,7 +91,7 @@ test_lei(sub {
                $ino_fdinfo or skip 'Linux/inotify-only removal removal', 1;
                open my $fh, '<', $ino_fdinfo or xbail "open $ino_fdinfo: $!";
                my $cmp = [ <$fh> ];
-               is_deeply($cmp, $ino_contents, 'inotify Maildir watches gone');
+               is_xdeeply($cmp, $ino_contents, 'inotify Maildir watches gone');
        };
 });