Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlAQN-0005x8-D3 for pgsql-committers@arkaria.postgresql.org; Sun, 01 May 2022 14:19:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlAPM-00061l-SG for pgsql-committers@arkaria.postgresql.org; Sun, 01 May 2022 14:18:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlAPM-00061c-L3 for pgsql-committers@lists.postgresql.org; Sun, 01 May 2022 14:18:44 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nlAPK-0004ue-2F for pgsql-committers@lists.postgresql.org; Sun, 01 May 2022 14:18:44 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id 097AC20005; Sun, 1 May 2022 14:18:38 +0000 (UTC) Message-ID: <12a044c9-e982-48d9-dd29-be1216a08805@dunslane.net> Date: Sun, 1 May 2022 10:18:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: pgsql: Remove command checks in tests of pg_basebackup and pg_receivewa Content-Language: en-US To: Michael Paquier Cc: pgsql-committers@lists.postgresql.org References: <14402151-376b-a57a-6d0c-10ad12608e12@dunslane.net> From: Andrew Dunstan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-05-01 Su 09:15, Michael Paquier wrote: > On Sat, Apr 30, 2022 at 04:52:54PM -0400, Andrew Dunstan wrote: >> This appears to have been misconceived, at least in the case of MSVC >> builds, as I have just discovered. It is entirely possible to have the >> lz4 libraries installed and build with them but not have the .exe, and >> unlike the configure case the MSVC build system doesn't conduct any test >> for it, resulting in a nasty looking TAP test failure. I assume similar >> failures are possible with zstd and maybe gzip. > Okay, we could change the code of vcregress.pl so as the different ENV > commands (tar, zstd, lz4 or gzip) are assigned as follows for the sake > of the tests: > - If a ENV value is available, trust the environment/user and rely on > it. > - If a ENV value is not available, try to look for it in the > environment by launching a simple $command --version (-version should > be fine across all the commands currently in need of coverage?). > -- On failure, set ENV{command} to an empty string. > -- On success, set ENV{command} = "$command" > > Does something like this look better to you? IIRC we know that tar will be available on Windows. I don't think we should do that check for every time we call vc_regress.pl, that seems wasteful. Maybe do it if the command is one that might require these commands, which I think would be bincheck or taptest. And/Or stash some status somewhere? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com