Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures
Date: 2019-11-26 07:13:50
Message-ID: 29991.1574752430@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Mon, Nov 25, 2019 at 09:01:46PM +0000, Andrew Dunstan wrote:
>> Close stdin where it's not needed in TestLib.pm procedures
>>
>> Where possible, do this using a pseudoterminal, so that things like
>> openssl that want to open /dev/tty if stdin isn't a tty won't.

> This one is causing failures with the TAP tests of initdb on all AIX
> animals and prairiedog:
> # Running: initdb --help
> Can't locate IO/Pty.pm in @INC (@INC contains: ../../../src/test/perl/
> . /usr/local/perl5.8.3/lib/5.8.3/darwin-2level

Perhaps the "where possible" caveat needs to include a test whether
IO::Pty is installed? It's evidently not there by default everywhere.

It's possible that we should just move the goalposts and say IO::Pty
is required for TAP testing. I can foresee that we'll have to do
that if we ever want automated tests of psql's tab completion,
for example.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-11-26 08:47:02 Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures
Previous Message Michael Paquier 2019-11-26 04:43:02 Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures