about summary refs log tree commit homepage
path: root/t/nntpd.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-19 23:19:37 +0000
committerEric Wong <e@yhbt.net>2020-04-20 20:18:21 +0000
commit6e07def560b211d9a1a3221862e72b7aeb4a31b3 (patch)
treeb6e3b54f928145b3f1c05bd5b0444f70f7eabd4f /t/nntpd.t
parent47acfe0e9d09e907393465e155e114e8fdc5f5a1 (diff)
downloadpublic-inbox-6e07def560b211d9a1a3221862e72b7aeb4a31b3.tar.gz
Barely noticeable on Linux, but this gives a 1-2% speedup
on a FreeBSD 11.3 VM and lets us use built-in redirects
rather than relying on /bin/sh.
Diffstat (limited to 't/nntpd.t')
-rw-r--r--t/nntpd.t5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/nntpd.t b/t/nntpd.t
index 826e3f3d..66aa48f1 100644
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -48,7 +48,7 @@ $ibx = PublicInbox::Inbox->new($ibx);
         my @cmd = ('-init', $group, $inboxdir, 'http://example.com/', $addr);
         push @cmd, "-V$version", '-Lbasic';
         ok(run_script(\@cmd), 'init OK');
-        is(system(qw(git config), "--file=$home/.public-inbox/config",
+        is(xsys(qw(git config), "--file=$home/.public-inbox/config",
                         "publicinbox.$group.newsgroup", $group),
                 0, 'enabled newsgroup');
         my $len;
@@ -304,7 +304,8 @@ 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 @of = `lsof -p $td->{pid} 2>/dev/null`;
+                my $rdr = { 2 => \(my $null) };
+                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');