提交 52c02f65 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

pager test: make fake pager consume all its input

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: NAnders Kaseorg <andersk@MIT.EDU>
Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e54c1f2d
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册