From: Thomas Rast <trast@student.ethz.ch>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Jeff King <peff@peff.net>,
Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH 1/3] test-terminal: give the child an empty stdin TTY
Date: Mon, 12 Dec 2011 19:34:40 +0100 [thread overview]
Message-ID: <201112121934.40953.trast@student.ethz.ch> (raw)
In-Reply-To: <20111212181915.GD31793@elie.hsd1.il.comcast.net>
Jonathan Nieder wrote:
> Hi,
>
> Thomas Rast wrote:
> > -# Run @$argv in the background with stdio redirected to $out and $err.
> > +# Run @$argv in the background with stdio redirected from $in and to $out and $err.
>
> I'm not thrilled about this change. The original purpose of
> test_terminal was to test commands like "git log" that need to check
> whether stdout is a tty in order to decide whether to use color and to
> paginate their output. Perhaps whether stdin is a tty _should_ affect
> those decisions, but it currently doesn't (for example, "echo HEAD |
> git log --stdin" works) and that would deserve a separate test, I'd
> think.
>
> The testsuite bug you mentioned sounds like a real one and worth
> fixing, though. Maybe there would be some way for test_terminal to
> give the caller some control over which file descriptors to replace
> with a terminal.
I'm not sure I understand what you are arguing for or why. That I
avoid wasting a Pty, and only replace stdin with /dev/null?
(Because with the current state of the tests, this shouldn't make much
of a difference. I just figured I should go all the way and give
commands an environment that really looks like they'd been called from
the terminal.)
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-12-12 18:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-12 18:09 [PATCH 1/3] test-terminal: give the child an empty stdin TTY Thomas Rast
2011-12-12 18:09 ` [PATCH 2/3] test-terminal: set output terminals to raw mode Thomas Rast
2011-12-12 18:23 ` Jonathan Nieder
2011-12-12 19:01 ` Thomas Rast
2011-12-13 5:09 ` Jonathan Nieder
2011-12-12 18:09 ` [PATCH 3/3] t/lib-terminal: test test-terminal's sanity Thomas Rast
2011-12-12 18:25 ` Jonathan Nieder
2011-12-12 18:19 ` [PATCH 1/3] test-terminal: give the child an empty stdin TTY Jonathan Nieder
2011-12-12 18:34 ` Thomas Rast [this message]
2011-12-12 19:05 ` Jonathan Nieder
2011-12-12 20:06 ` Junio C Hamano
2011-12-12 19:07 ` Junio C Hamano
2011-12-12 19:14 ` Thomas Rast
2011-12-12 19:16 ` Jeff King
2011-12-12 20:38 ` Junio C Hamano
2011-12-12 23:25 ` Jonathan Nieder
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=201112121934.40953.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=mhagger@alum.mit.edu \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.