From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4B13E1F9DE for ; Tue, 21 Apr 2020 03:22:52 +0000 (UTC) From: Eric Wong 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 Message-Id: <20200421032252.9151-2-e@yhbt.net> In-Reply-To: <20200421032252.9151-1-e@yhbt.net> References: <20200421032252.9151-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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');