Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZV2u-0001gL-28 for pgsql-committers@arkaria.postgresql.org; Tue, 26 Nov 2019 07:14:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iZV2s-0004f1-1Z for pgsql-committers@arkaria.postgresql.org; Tue, 26 Nov 2019 07:13:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZV2r-0004ZP-MH for pgsql-committers@lists.postgresql.org; Tue, 26 Nov 2019 07:13:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iZV2p-0007Cb-5p for pgsql-committers@lists.postgresql.org; Tue, 26 Nov 2019 07:13:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id xAQ7Do8C029992; Tue, 26 Nov 2019 02:13:50 -0500 From: Tom Lane To: Michael Paquier cc: Andrew Dunstan , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures In-reply-to: <20191126044302.GC5435@paquier.xyz> References: <20191126044302.GC5435@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Tue, 26 Nov 2019 13:43:02 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29990.1574752430.1@sss.pgh.pa.us> Date: Tue, 26 Nov 2019 02:13:50 -0500 Message-ID: <29991.1574752430@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier 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