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

From Michael Paquier
Subject Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures
Date
Msg-id 20191126044302.GC5435@paquier.xyz
Whole thread Raw
In response to pgsql: Close stdin where it's not needed in TestLib.pm procedures  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-committers
Hi Andrew,

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.
> Elsewhere, i.e. Windows, just close by providing an empty string using
> the standard IPC::Run pipe mechanism.
>
> Patch by Andrew Dunstan, based on an idea from Craig Ringer.
>
> Reviewed by Mark Dilger.
>
> Discussion: https://postgr.es/m/873ebb57-fc98-340d-949d-691b1810bf66@2ndQuadrant.com

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 SCALAR(0x1987690) in harness() parameter 7 at
../../../src/test/perl//TestLib.pm line 692
--
Michael

Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Use native methods to open input in TestLib::slurp_fileon Windo
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures