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

2019-11-26 Thread Michael Paquier
On Tue, Nov 26, 2019 at 09:36:50PM -0500, Andrew Dunstan wrote: > So I'm a bit stuck. Probably the best thing to do for now is revert the > patch and mark the tests that need it in the libpq-sslpassword patch as > TODO (with todo_skip). If somebody whose perl-fu is greater than mine > can disentang

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

2019-11-26 Thread Andrew Dunstan
On 11/26/19 5:08 PM, Andrew Dunstan wrote: > On 11/26/19 3:30 PM, Tom Lane wrote: >> Peter Eisentraut writes: >>> On 2019-11-26 05:43, Michael Paquier wrote: This one is causing failures with the TAP tests of initdb on all AIX animals and prairiedog: # Running: initdb --help

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

2019-11-26 Thread Andrew Dunstan
On 11/26/19 3:30 PM, Tom Lane wrote: > Peter Eisentraut writes: >> On 2019-11-26 05:43, Michael Paquier wrote: >>> 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: ../.

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

2019-11-26 Thread Tom Lane
Peter Eisentraut writes: > On 2019-11-26 05:43, Michael Paquier wrote: >> 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/

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

2019-11-26 Thread Tom Lane
Andrew Dunstan writes: > here's my proposed fix. Looks sane by eyeball (didn't test it). regards, tom lane

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

2019-11-26 Thread Andrew Dunstan
On 11/26/19 3:47 AM, Michael Paquier wrote: > On Tue, Nov 26, 2019 at 02:13:50AM -0500, Tom Lane wrote: >> 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

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

2019-11-26 Thread Peter Eisentraut
On 2019-11-26 05:43, Michael Paquier wrote: 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 [...] Unexpected

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

2019-11-26 Thread Michael Paquier
On Tue, Nov 26, 2019 at 02:13:50AM -0500, Tom Lane wrote: > 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 te

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

2019-11-25 Thread Tom Lane
Michael Paquier writes: > On Mon, Nov 25, 2019 at 09:01:46PM +, 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. > Th

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

2019-11-25 Thread Michael Paquier
Hi Andrew, On Mon, Nov 25, 2019 at 09:01:46PM +, 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. > Elsewhere, i.e. Window

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

2019-11-25 Thread Andrew Dunstan
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. Elsewhere, i.e. Windows, just close by providing an empty string using the standard IPC::Run pipe mechanism.