user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: meta@public-inbox.org
Subject: [PATCH] cindex: fix test when missing time(1) executable
Date: Wed, 15 Nov 2023 05:55:49 +0000	[thread overview]
Message-ID: <20231115055549.M979749@dcvr> (raw)
In-Reply-To: <20231114234620.M78107@dcvr>

Eric Wong <e@80x24.org> 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 <konstantin@linuxfoundation.org>
---
 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 :>

  parent reply	other threads:[~2023-11-15  5:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-14 21:50 t/cindex.t "associate w/o search" test hangs for me Konstantin Ryabitsev
2023-11-14 22:16 ` Eric Wong
2023-11-14 22:30   ` Konstantin Ryabitsev
2023-11-14 22:46     ` Eric Wong
2023-11-14 23:05       ` Konstantin Ryabitsev
2023-11-14 23:46         ` Eric Wong
2023-11-14 23:51           ` Konstantin Ryabitsev
2023-11-15  0:07             ` Konstantin Ryabitsev
2023-11-15  1:06               ` Eric Wong
2023-11-15  1:43                 ` Konstantin Ryabitsev
2023-11-15  3:09                   ` Eric Wong
2023-11-15 13:21                     ` Konstantin Ryabitsev
2023-11-15 19:30                       ` Eric Wong
2023-11-25 20:43                         ` libgit2 [was: Re: t/cindex.t "associate w/o search" test hangs for me] Eric Wong
2023-11-15  1:11             ` t/cindex.t "associate w/o search" test hangs for me Eric Wong
2023-11-15  5:55           ` Eric Wong [this message]
2023-11-15 13:25             ` [PATCH] cindex: fix test when missing time(1) executable Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231115055549.M979749@dcvr \
    --to=e@80x24.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).