From: Eric Wong <e@yhbt.net>
To: meta@public-inbox.org
Subject: [PATCH 1/3] t/nntpd: fix lsof check w/ TEST_RUN_MODE=0
Date: Tue, 21 Apr 2020 03:22:50 +0000 [thread overview]
Message-ID: <20200421032252.9151-2-e@yhbt.net> (raw)
In-Reply-To: <20200421032252.9151-1-e@yhbt.net>
The `xqx' sub requires an absolute path for optional
commands.
Fixes: 6e07def560b211d9 ("testcommon: spawn-aware system() and qx[] workalikes")
---
t/nntpd.t | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/nntpd.t b/t/nntpd.t
index 66aa48f1..b2ef575d 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -4,6 +4,7 @@ use strict;
use warnings;
use Test::More;
use PublicInbox::TestCommon;
+use PublicInbox::Spawn qw(which);
require_mods(qw(DBD::SQLite));
require PublicInbox::SearchIdx;
require PublicInbox::Msgmap;
@@ -304,8 +305,9 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000
if ($INC{'Search/Xapian.pm'} && ($ENV{TEST_RUN_MODE}//2)) {
skip 'Search/Xapian.pm pre-loaded (by t/run.perl?)', 1;
}
+ my $lsof = which('lsof') or skip 'lsof missing', 1;
my $rdr = { 2 => \(my $null) };
- my @of = xqx(['lsof', '-p', $td->{pid}], undef, $rdr);
+ my @of = xqx([$lsof, '-p', $td->{pid}], undef, $rdr);
skip('lsof broken', 1) if (!scalar(@of) || $?);
my @xap = grep m!Search/Xapian!, @of;
is_deeply(\@xap, [], 'Xapian not loaded in nntpd');
next prev parent reply other threads:[~2020-04-21 3:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 3:22 [PATCH 0/3] t/nntpd: small fixes and cleanups Eric Wong
2020-04-21 3:22 ` Eric Wong [this message]
2020-04-21 3:22 ` [PATCH 2/3] t/nntpd: reduce dependencies on internal API Eric Wong
2020-04-21 3:22 ` [PATCH 3/3] t/nntpd: die if we can't open stderr output Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421032252.9151-2-e@yhbt.net \
--to=e@yhbt.net \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).