* [PATCH 3/4] t/ds-leak: use BSD::Resource
2020-04-19 23:19 5% [PATCH 0/4] test speedups for FreeBSD Eric Wong
@ 2020-04-19 23:19 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2020-04-19 23:19 UTC (permalink / raw)
To: meta
We use BSD::Resource in other places, so there's no sense
in avoiding it, here.
---
t/ds-leak.t | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/t/ds-leak.t b/t/ds-leak.t
index ea0eeaa6..b29d814e 100644
--- a/t/ds-leak.t
+++ b/t/ds-leak.t
@@ -6,6 +6,7 @@
use strict;
use warnings;
use Test::More;
+use PublicInbox::TestCommon;
use_ok 'PublicInbox::DS';
if ('close-on-exec for epoll and kqueue') {
@@ -44,8 +45,9 @@ if ('close-on-exec for epoll and kqueue') {
}
SKIP: {
- # not bothering with BSD::Resource
- chomp(my $n = `/bin/sh -c 'ulimit -n'`);
+ require_mods('BSD::Resource', 1);
+ my $rlim = BSD::Resource::RLIMIT_NOFILE();
+ my ($n,undef) = BSD::Resource::getrlimit($rlim);
# FreeBSD 11.2 with 2GB RAM gives RLIMIT_NOFILE=57987!
if ($n > 1024 && !$ENV{TEST_EXPENSIVE}) {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/4] test speedups for FreeBSD
@ 2020-04-19 23:19 5% Eric Wong
2020-04-19 23:19 7% ` [PATCH 3/4] t/ds-leak: use BSD::Resource Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2020-04-19 23:19 UTC (permalink / raw)
To: meta
There's a tiny improvement on Linux, but FreeBSD benefits
more, especially [PATCH 2/4]
Eric Wong (4):
import: init_bare: allow use as method, use in tests
import: init_bare: use pure Perl
t/ds-leak: use BSD::Resource
testcommon: spawn-aware system() and qx[] workalikes
lib/PublicInbox/Import.pm | 31 ++++++++++++++++++++++++-------
lib/PublicInbox/TestCommon.pm | 26 ++++++++++++++++++++++++--
lib/PublicInbox/V2Writable.pm | 5 ++---
t/admin.t | 3 ++-
t/altid.t | 2 +-
t/cgi.t | 3 ++-
t/config.t | 5 +++--
t/convert-compact.t | 3 +--
t/ds-leak.t | 16 ++++++++++------
t/edit.t | 2 +-
t/feed.t | 2 +-
t/git.t | 22 ++++++++++------------
t/hl_mod.t | 20 +++++++-------------
t/html_index.t | 2 +-
t/httpd-corner.t | 30 ++++++++++++++----------------
t/httpd.t | 8 ++++----
t/import.t | 3 +--
t/indexlevels-mirror.t | 8 ++++----
t/init.t | 5 +++--
t/mda.t | 5 +++--
t/mda_filter_rubylang.t | 6 +++---
t/multi-mid.t | 2 +-
t/nntpd.t | 5 +++--
t/nulsubject.t | 5 +++--
t/psgi_attach.t | 2 +-
t/psgi_mount.t | 2 +-
t/psgi_text.t | 2 +-
t/replace.t | 2 +-
t/search-thr-index.t | 3 ++-
t/search.t | 2 +-
t/solver_git.t | 8 +++++---
t/v1-add-remove-add.t | 2 +-
t/v1reindex.t | 2 +-
t/v2mda.t | 2 +-
t/v2mirror.t | 4 ++--
t/v2writable.t | 2 +-
t/watch_maildir.t | 3 ++-
t/watch_maildir_v2.t | 3 ++-
t/www_listing.t | 24 ++++++++++++++----------
xt/git-http-backend.t | 6 +++---
40 files changed, 167 insertions(+), 121 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-19 23:19 5% [PATCH 0/4] test speedups for FreeBSD Eric Wong
2020-04-19 23:19 7% ` [PATCH 3/4] t/ds-leak: use BSD::Resource Eric Wong
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).