From: Eric Wong <e@80x24.org>
To: phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] t9700: ensure cat-file info isn't buffered by default
Date: Wed, 19 Jun 2024 18:08:07 +0000 [thread overview]
Message-ID: <20240619180807.M97115@dcvr> (raw)
In-Reply-To: <6e80eea5-b6ce-4218-8c43-dde2b5a698f5@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> wrote:
> Hi Eric
>
> On 17/06/2024 11:43, Eric Wong wrote:
> > +# ensure --batch-check is unbuffered by default
> > +my ($pid, $in, $out, $ctx) = $r->command_bidi_pipe(qw(cat-file --batch-check));
> > +print $out $file1hash, "\n" or die $!;
>
> It's been a while since I did any perl scripting and I'm not clear whether
> $out is buffered or not and if it is whether it is guaranteed to be flushed
> when we print "\n". It might be worth adding a explicit flush so it is clear
> that any deadlocks come from cat-file and not our test code.
Pipes and sockets created by Perl are always unbuffered since
5.8, at least. If they were buffered, Git.pm users (including
git-svn) wouldn't have worked at all.
> > +my $info = <$in>;
>
> Is there an easy way to add a timeout to this read so that the failure mode
> isn't "the test hangs without printing anything"? I'm not sure that failure
> mode is easy to diagnose from our CI output as it is hard to tell which test
> caused the CI to timeout and it takes ages for the CI to time out.
Yeah, select() has been added in v2.
next prev parent reply other threads:[~2024-06-19 18:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-17 10:43 [PATCH 0/2] cat-file related doc and test Eric Wong
2024-06-17 10:43 ` [PATCH 1/2] Git.pm: use array in command_bidi_pipe example Eric Wong
2024-06-17 20:33 ` Junio C Hamano
2024-06-17 10:43 ` [PATCH 2/2] t9700: ensure cat-file info isn't buffered by default Eric Wong
2024-06-17 20:50 ` Junio C Hamano
2024-06-18 21:30 ` [PATCH v2 2/2] t1006: " Eric Wong
2024-06-18 23:37 ` Junio C Hamano
2024-06-19 17:56 ` Eric Wong
2024-06-20 17:28 ` Junio C Hamano
2024-06-21 7:16 ` Jeff King
2024-06-21 20:00 ` Eric Wong
2024-06-24 15:19 ` Jeff King
2024-06-17 23:08 ` [PATCH 2/2] t9700: " Junio C Hamano
2024-06-19 9:08 ` Phillip Wood
2024-06-19 18:08 ` Eric Wong [this message]
2024-06-21 13:03 ` Phillip Wood
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240619180807.M97115@dcvr \
--to=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox