From: Jonathan Nieder <jrnieder@gmail.com>
To: Anders Kaseorg <andersk@MIT.EDU>
Cc: Olaf Meeuwissen <olaf.meeuwissen@avasys.jp>, git@vger.kernel.org
Subject: [PATCH jn/pager-lv-default-env] pager test: make fake pager consume all its input
Date: Thu, 30 Jan 2014 08:42:32 -0800 [thread overview]
Message-ID: <20140130164232.GF27577@google.com> (raw)
In-Reply-To: <52E9FC23.2030200@mit.edu>
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>
---
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.
| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--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
--
1.9.rc1.175.g0b1dcb5
next prev parent reply other threads:[~2014-01-30 16:42 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 ` Jonathan Nieder [this message]
2014-01-31 17:07 ` [PATCH jn/pager-lv-default-env] pager test: make fake pager consume all its input Junio C Hamano
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=20140130164232.GF27577@google.com \
--to=jrnieder@gmail.com \
--cc=andersk@MIT.EDU \
--cc=git@vger.kernel.org \
--cc=olaf.meeuwissen@avasys.jp \
/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;
as well as URLs for NNTP newsgroup(s).