From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 448811F406; Wed, 15 Nov 2023 05:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1700027880; bh=WTDGv4iBl2DgclA4LI6J5Q7dZMyaQura5o0/Tw3oxAo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=swgdhQmFr51GP9jH9csmMLb8CNNJXr9tyYrTwYvppzs4esqRu6eZzTlH8g3E7spN4 nxNNiSNmd3FcHNHB3toCcpAY0ZvjRUd4JAPOeNXumwGGfFNzKef+N3ABcZB2iB1KWe BAsoeBuvrx6STJ1Ljf5UzBX3ZE4tx5S+Isr+EqnU= Date: Wed, 15 Nov 2023 05:55:49 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: [PATCH] cindex: fix test when missing time(1) executable Message-ID: <20231115055549.M979749@dcvr> References: <20231114-idealistic-marvellous-dove-dd143e@nitro> <20231114221653.M550291@dcvr> <20231114-prompt-sage-bobcat-0e6bec@nitro> <20231114224657.M270072@dcvr> <20231114-accelerated-myrtle-fulmar-2ea0df@nitro> <20231114234620.M78107@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231114234620.M78107@dcvr> List-Id: Eric Wong wrote: > +++ b/t/cindex.t > @@ -210,7 +210,7 @@ EOM > my $cmd = [ qw(-cindex -u --all --associate -d), "$tmp/ext", > '-I', $basic->{inboxdir} ]; > $cidx_out = $cidx_err = ''; > - ok(run_script($cmd, $env, $opt), 'associate w/o search'); > + ok(run_script($cmd, $env, undef), 'associate w/o search'); > like($cidx_err, qr/W: \Q$basic->{inboxdir}\E not indexed for search/, > 'non-Xapian-enabled inbox noted'); > } Yeah, using this on your new VM showed the problem right away: ------8<------ Subject: [PATCH] cindex: fix test when missing time(1) executable It was only there for development purposes because associate is slow, but it causes the test to get stuck on systems where it's not available. So remove it and just call join(1posix). Note: this is not the `time' builtin found in shells, this executable shows memory and pagefault info (and more with the `-v' switch). Unfortunately, it's not installed on many systems despite being widely-packaged. Reported-by: Konstantin Ryabitsev --- lib/PublicInbox/CodeSearchIdx.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/CodeSearchIdx.pm b/lib/PublicInbox/CodeSearchIdx.pm index 9ceef16c..3a30b5e5 100644 --- a/lib/PublicInbox/CodeSearchIdx.pm +++ b/lib/PublicInbox/CodeSearchIdx.pm @@ -890,7 +890,7 @@ sub associate { my @pending = keys %{$self->{PENDING}}; die "E: pending=@pending jobs not done\n" if @pending; progress($self, 'associating...'); - my @join = ('time', @JOIN, 'to_ibx_id', 'to_root_id'); + my @join = (@JOIN, 'to_ibx_id', 'to_root_id'); my $rd = popen_rd(\@join, $CMD_ENV, { -C => "$TMPDIR" }); my %score; while (<$rd>) { # PFX ibx_ids root_id Much more gnarly work happening in this area :>