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-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 535571F9FC for ; Fri, 19 Mar 2021 04:22:58 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] xt/create-many-inboxes: adjust for detect_nproc, no fsync Date: Fri, 19 Mar 2021 07:22:58 +0300 Message-Id: <20210319042258.23925-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: detect_nproc is in the IPC module, now; and we can safely disable fsync when creating test data. And "modernize" up to 5.10.1 while we're at it. The use fsync was causing this to run for hours instead of minutes since I forgot to use eatmydata. --- xt/create-many-inboxes.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xt/create-many-inboxes.t b/xt/create-many-inboxes.t index f44334cc..d22803e3 100644 --- a/xt/create-many-inboxes.t +++ b/xt/create-many-inboxes.t @@ -2,9 +2,10 @@ # Copyright (C) 2020-2021 all contributors # License: AGPL-3.0+ use strict; -use Test::More; +use v5.10.1; use PublicInbox::TestCommon; use PublicInbox::Eml; +use PublicInbox::IPC; use File::Path qw(mkpath); use IO::Handle (); # autoflush use POSIX qw(_exit); @@ -21,7 +22,7 @@ require_git 2.6; require_mods(qw(DBD::SQLite Search::Xapian)); use_ok 'PublicInbox::V2Writable'; my $nr_inbox = $ENV{NR_INBOX} // 10; -my $nproc = $ENV{NPROC} || PublicInbox::V2Writable::detect_nproc() || 2; +my $nproc = $ENV{NPROC} || PublicInbox::IPC::detect_nproc() || 2; my $indexlevel = $ENV{TEST_INDEXLEVEL} // 'basic'; diag "NR_INBOX=$nr_inbox NPROC=$nproc TEST_INDEXLEVEL=$indexlevel"; diag "TEST_MANY_ROOT=$many_root"; @@ -39,6 +40,7 @@ my $v2_init_add = sub { address => [ "test-$i\@example.com" ], url => [ "//example.com/test-$i" ], version => 2, + -no_fsync => 1, }); $ibx->{indexlevel} = $indexlevel if $level_cfg ne ''; my $entry = <