From: Junio C Hamano <gitster@pobox•com>
To: Jonathan Nieder <jrnieder@gmail•com>
Cc: Anders Kaseorg <andersk@MIT•EDU>,
Olaf Meeuwissen <olaf.meeuwissen@avasys•jp>,
git@vger•kernel.org
Subject: Re: [PATCH jn/pager-lv-default-env] pager test: make fake pager consume all its input
Date: Fri, 31 Jan 2014 09:07:44 -0800 [thread overview]
Message-ID: <xmqq7g9ghyfz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140130164232.GF27577@google.com> (Jonathan Nieder's message of "Thu, 30 Jan 2014 08:42:32 -0800")
Jonathan Nieder <jrnieder@gmail•com> writes:
> Otherwise there is a race: if 'git log' finishes writing before the
> pager terminates and closes the pipe, all is well, and if the pager
> finishes quickly enough then 'git log' terminates with SIGPIPE.
>
> died of signal 13 at /build/buildd/git-1.9~rc1/t/test-terminal.perl line 33.
> not ok 6 - LESS and LV envvars are set for pagination
>
> Noticed on Ubuntu PPA builders, where the race was lost about half the
> time. Compare v1.7.0.2~6^2 (tests: Fix race condition in t7006-pager,
> 2010-02-22).
>
> Reported-by: Anders Kaseorg <andersk@MIT•EDU>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail•com>
> ---
Thanks. The use of "wc" looks cute (I would have used "cat").
> Anders Kaseorg wrote:
>> On 01/06/2014 09:14 PM, Jonathan Nieder wrote:
>
>>> + PAGER="env >pager-env.out" &&
>>> + export PAGER &&
>>> +
>>> + test_terminal git log
> [...]
>> On the Ubuntu PPA builders, I’m seeing this new test fail with
>> SIGPIPE about half the time:
>>
>> died of signal 13 at /build/buildd/git-1.9~rc1/t/test-terminal.perl line 33.
>> not ok 6 - LESS and LV envvars are set for pagination
>
> Good catch. Sorry for the trouble.
>
> t/t7006-pager.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
> index 7fe3367..b9365b4 100755
> --- a/t/t7006-pager.sh
> +++ b/t/t7006-pager.sh
> @@ -40,7 +40,7 @@ test_expect_failure TTY 'pager runs from subdir' '
> test_expect_success TTY 'LESS and LV envvars are set for pagination' '
> (
> sane_unset LESS LV &&
> - PAGER="env >pager-env.out" &&
> + PAGER="env >pager-env.out; wc" &&
> export PAGER &&
>
> test_terminal git log
prev parent reply other threads:[~2014-01-31 17:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <874n6zbqlh.fsf@helix.nebula.avasys.jp>
[not found] ` <20140106193339.GH3881@google.com>
[not found] ` <874n5ghenr.fsf@helix.nebula.avasys.jp>
2014-01-07 2:14 ` [PATCH] pager: set LV=-c alongside LESS=FRSX Jonathan Nieder
2014-01-07 4:09 ` Olaf Meeuwissen
2014-01-07 17:00 ` Junio C Hamano
2014-01-07 18:17 ` Andreas Schwab
2014-01-30 7:15 ` Anders Kaseorg
2014-01-30 16:42 ` [PATCH jn/pager-lv-default-env] pager test: make fake pager consume all its input Jonathan Nieder
2014-01-31 17:07 ` Junio C Hamano [this message]
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=xmqq7g9ghyfz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=andersk@MIT$(echo .)EDU \
--cc=git@vger$(echo .)kernel.org \
--cc=jrnieder@gmail$(echo .)com \
--cc=olaf.meeuwissen@avasys$(echo .)jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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