Re: [PATCH/RFC 7/7] t7006-pager: if stdout is not a terminal, make a new one

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

 



On Fri, Feb 19, 2010 at 01:23:31AM -0600, Jonathan Nieder wrote:

> Test t7006-pager skips most of its tests except when running with
> --verbose, for lack of a terminal to use.  Thus many of the tests
> would not get much coverage, since whole testsuite runs with --verbose
> are rare.  Redirecting output to /dev/tty would be problematic because
> (1) there really could be no controlling terminal and (2) test
> breakage might manifest itself by the producing extraneous output.
> Luckily, there is a way around this: Unix98-style pseudo-terminals
> allow us to create a fake terminal on the fly and capture its output.
> 
> Do so.  The new test-terminal command to accomplish this uses
> posix_openpt (from SuSv3) to create a terminal because that is good
> enough on Linux.  I would like some feedback on what platforms are
> missing that function and thus what alternate interfaces are worth
> supporting.  The perl IO::Tty module could take care of this for us,
> but I do not think it is worth the extra dependency.

Solaris 8 and 9 seem to be lacking it. Solaris 10 does have it. AIX 5.2
and 6.1 both have it.

So it would mean some platforms couldn't run all tests. That is probably
good enough, given that most of our terminal-related bugs have not been
platform-specific problems.

Still, it seems like just wrapping isatty would be simpler. I guess you
are opposed to carrying around test-specific code in the main git
binary?

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