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 1iZnCO-00044u-Ml for pgsql-committers@arkaria.postgresql.org; Wed, 27 Nov 2019 02:37: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 1iZnCN-0002Dc-EC for pgsql-committers@arkaria.postgresql.org; Wed, 27 Nov 2019 02:36:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZnCN-0002C3-6s for pgsql-committers@lists.postgresql.org; Wed, 27 Nov 2019 02:36:59 +0000 Received: from mail-yb1-xb43.google.com ([2607:f8b0:4864:20::b43]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iZnCK-0005TR-1F for pgsql-committers@lists.postgresql.org; Wed, 27 Nov 2019 02:36:58 +0000 Received: by mail-yb1-xb43.google.com with SMTP id v15so8435203ybp.13 for ; Tue, 26 Nov 2019 18:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=w/u0g4vBPBLNtmTllxJw0lIxfUeWs4hEM9Ov1hVoTtY=; b=a7qxRoBZKRfcVkDUViYeDcO6X4h5xnSXPBFGhGXoU54lk9GoSmZflKnkILQFTtfbpj ZYvYFyp4azRFedZRYfd8EXBWuHZ/EI5Klutobv6nCnnKzFEsTu3iVC6xe+HN47b1qAQM Nz/hjNlbV74NdxauxJ7QKyUc+kSWAwpugmmAx0prYxXL6wD8Ux2oi5Dn+IUsHJpALGXf Gwly9ACE+qjSbnQXMmqp49xlTUH+DHMJpDHHCuhqlNCZGWTMiO7CCdGnyQ/1fm4iaSkt mgFyrTL9TSRDbq7js79cFKnd7MGn+B3kyswxr6imwnJXHVa6brQ6MUaGizc1ScF9ZGiM tsnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=w/u0g4vBPBLNtmTllxJw0lIxfUeWs4hEM9Ov1hVoTtY=; b=kZOt64OdnSMBjKxp8Lwne8APZy9oO4HFsVShzg6f3PP3j9tGc/2A0xSurqt4rubfOG XzN0BQuUI/rksQ9IMYiMOX3+rNFBNivIk9VvBomj5ocVjkyUOFHm0hfnuPufyYkcZw3b jVgmwEcpGsVLSGboqfnTG/lri9Vzh4Dpvwu8erQOYLgE7Bil7QDmbl0oayYWYotp37gK 91WDj9xhy0LqkUl8o9yTLMFL6Jqj1Vk13osSvfbVgk+b+4Xx2+G+BmbP+DDAdJFF5Lbg 7up2XZlKrCzUWGRWK5fw1s4UqR693DvYK/8z8AwpAdH74nRukA3C0YNOIyZHu1xt7NYA +35A== X-Gm-Message-State: APjAAAUKirE7FaevYHlH61n4EdDZI0PYLFTPr3rWaqMt31vTiQP4Rnxv 0XcHLEVapflv4SDfl0AE26Xmc66ILIpF3uZ5sKk8PgP/NaYJTboamyynGZ/kXueMw+rM1d8jwjI bPIwiCHz1pzp3nG1sm/tcLam7MrhuB7pdAoi7+5dGVFqY94s/i+TsFNnowWqTldkC193QZh0L6o D8ixOBPP4bjAcYgZnqZGea9qWm X-Google-Smtp-Source: APXvYqzNbJoLSCdjTep10ICKpz5vxBvhQophwBXShV95F4jOT6/CpKggw7T5nGTufS/sLDAldhanAQ== X-Received: by 2002:a5b:446:: with SMTP id s6mr29798303ybp.5.1574822213277; Tue, 26 Nov 2019 18:36:53 -0800 (PST) Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net. [99.10.92.30]) by smtp.gmail.com with ESMTPSA id t82sm6475900ywt.77.2019.11.26.18.36.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2019 18:36:52 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Close stdin where it's not needed in TestLib.pm procedures To: Tom Lane , Peter Eisentraut Cc: Michael Paquier , Andrew Dunstan , pgsql-committers@lists.postgresql.org References: <20191126044302.GC5435@paquier.xyz> <24716.1574800254@sss.pgh.pa.us> <46dfde73-e6f9-7ae1-7e5f-f5ac2d3ee758@2ndQuadrant.com> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+wsCY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgBYhBOQ+WEYd/Hy/RGkVpZn6f8tZ /DuBAhkBBQJd1pSYBQkSzqMsAAoJEJn6f8tZ/DuBJmEIAIVFBIC3qGqh+YTPVTkfowwxpHz0 tZSPjZ6GS/5y62kgoZrZOVXw+Rg2ce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ndQuadrant.com> Date: Tue, 26 Nov 2019 21:36:50 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <46dfde73-e6f9-7ae1-7e5f-f5ac2d3ee758@2ndQuadrant.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 >>>> 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 >>> I'm also seeing this problem on macOS in >>> src/test/recovery/t/016_min_consistency.pl . >> I just noticed that my buildfarm animal longfin has been stuck for >> the past 24 hours in t/001_initdb.pl, and I can replicate that >> in a manual build. ktrace says it's in some sort of loop. >> >> Apparently, macOS has got IO::Pty but it doesn't actually work >> the way this patch expects. Therefore, the proposed patch will >> leave things still broken for macOS :-( >> >> I tried this: >> >> diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm >> index 18b4ce35c2..d67ffc4368 100644 >> --- a/src/test/perl/TestLib.pm >> +++ b/src/test/perl/TestLib.pm >> @@ -192,8 +192,7 @@ INIT >> } >> else >> { >> - use charnames ':full'; >> - @no_stdin = ('> + @no_stdin = ('> } >> } >> >> and that seems to fix it. I wonder what's the point of sending >> a nonempty string to the pty, exactly? >> >> > > > Oh, I missed seeing this. > > > The short answer is I didn't question it because it worked for me. I'll > test out your change on Linux with my test case. > > This causes some of the new tests I want to run to hang on Linux, presumably waiting for the pty to close :-( 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 disentangle this mess that would be nice :-) Thoughts? cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services