Re: [PATCH v2 5/8] test_terminal: give priority to test-terminal.perl usage

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

 



On Sun, Oct 17, 2010 at 02:37:00AM +0800, Tay Ray Chuan wrote:

> The outcome depends on whether stdout was already a terminal (in which
> case test_terminal is a noop) or not (in which case test_terminal
> introduces a pseudo-tty in the middle of the pipeline).
> 
> 	$ test_terminal.perl sh -c 'test -t 1 && echo >&2 YES' >out
> 	YES
> 	$ sh -c 'test -t 1 && echo >&2 YES' >out
> 	$
> 
> How about this?
> 
>  - use the test_terminal script even when running with "-v"
>    if IO::Pty is available, to allow commands like
> 
> 	test_terminal foo >out 2>err
> 
>  - add a separate TTYREDIR prerequisite which is only set
>    when the test_terminal script is usable

Is it even worth keeping the direct-to-tty code at all? Yes, it means
that people without IO::Pty can use _some_ terminal tests with "-v". But
it creates a headache for test writers in understanding the subtle
difference between TTY and TTYREDIR.

-Peff
--
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]