From 4c6c853494b4936825741bb5e8885f1312639058 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 16 Mar 2021 23:02:18 -0800 Subject: tests: show lsof output on deleted-file-check failures This may help track down some occasional test failures I'm seeing. --- t/nntpd.t | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 't/nntpd.t') 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) }; { -- cgit v1.2.3-24-ge0c7