Re: [PATCH 1/3] test-terminal: give the child an empty stdin TTY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thomas Rast wrote:

> --- a/t/test-terminal.perl
> +++ b/t/test-terminal.perl
> @@ -4,14 +4,16 @@
>  use warnings;
>  use IO::Pty;
>  use File::Copy;
> +use POSIX ();
>
> -# 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.

Just musing,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]