about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-16 23:02:18 -0800
committerEric Wong <e@80x24.org>2021-03-17 19:03:14 +0000
commit4c6c853494b4936825741bb5e8885f1312639058 (patch)
tree417b6ef72b5c4c4b738effbe5a1cca36c359ae8b
parent081918279573b209c27a91e443c37df597bcd43f (diff)
downloadpublic-inbox-4c6c853494b4936825741bb5e8885f1312639058.tar.gz
This may help track down some occasional test failures I'm
seeing.
-rw-r--r--t/httpd-corner.t3
-rw-r--r--t/nntpd.t5
2 files changed, 5 insertions, 3 deletions
diff --git a/t/httpd-corner.t b/t/httpd-corner.t
index 794d8aeb..296e1dc1 100644
--- a/t/httpd-corner.t
+++ b/t/httpd-corner.t
@@ -610,7 +610,8 @@ SKIP: {
         my $null_in = '';
         my $rdr = { 2 => \(my $null_err), 0 => \$null_in };
         my @lsof = xqx([$lsof, '-p', $td->{pid}], undef, $rdr);
-        is_deeply([grep(/\bdeleted\b/, @lsof)], [], 'no lingering deleted inputs');
+        my $d = [ grep(/\(deleted\)/, @lsof) ];
+        is_deeply($d, [], 'no lingering deleted inputs') or diag explain($d);
 
         # filter out pipes inherited from the parent
         my @this = xqx([$lsof, '-p', $$], undef, $rdr);
diff --git a/t/nntpd.t b/t/nntpd.t
index 7db371dd..ce4d7cf9 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -365,8 +365,9 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
                 $lsof or skip 'lsof missing', 1;
                 ($^O =~ /\A(?:linux)\z/) or
                         skip "lsof /(deleted)/ check untested on $^O", 1;
-                my @of = xqx([$lsof, '-p', $td->{pid}], undef, $noerr);
-                is(scalar(grep(/\(deleted\)/, @of)), 0, 'no deleted files');
+                my @lsof = xqx([$lsof, '-p', $td->{pid}], undef, $noerr);
+                my $d = [ grep(/\(deleted\)/, @lsof) ];
+                is_deeply($d, [], 'no deleted files') or diag explain($d);
         };
         SKIP: { test_watch($tmpdir, $host_port, $group) };
         {