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 1lwksy-0002j2-7B for pgsql-committers@arkaria.postgresql.org; Fri, 25 Jun 2021 12:24:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lwksw-0006qV-Db for pgsql-committers@arkaria.postgresql.org; Fri, 25 Jun 2021 12:24:38 +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 1lwksv-0006qL-2j for pgsql-committers@lists.postgresql.org; Fri, 25 Jun 2021 12:24:38 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwksr-0001PK-Jw for pgsql-committers@lists.postgresql.org; Fri, 25 Jun 2021 12:24:36 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 78F383200918; Fri, 25 Jun 2021 08:24:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 25 Jun 2021 08:24:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=iv8ix8WTOK+VFHIvGwm4RKxhjJN VymbamvJE8iuputU=; b=Vdj2XHvRh188URz4TdU3UHxqkMkNjc+SbS7LwxRMjJw WO+YVqZE1Rz0nbHmjPyxeMTuY11uxlfKQuWl86wHw8UHGS/HimuzzrMeNTtudTM/ AxL+4KbXF7jeixZ92uXQhRSn7FmlOT6AOp4BREZavro9Xb66osYYG4kXeTfDTm3a mmKXioNn61219Y0CJ07jBBmuhv8DQmlVcwDsllm7qOeqieZUtUPgfNZg2cghJVSS ZYc9HHVtLVlXOqYci0w2gbjDjT/ag8tUdKT+pSOfYjcXAcD0QZXaUvWp+TVCKFfl ZgMumAGXLt3fYrVhK29bkzlTPGyzSKHHOZqga1q8L5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=iv8ix8 WTOK+VFHIvGwm4RKxhjJNVymbamvJE8iuputU=; b=Gi5Rs0OSU1T+8ZTvyaAQbV hJR1kFs/4wlqqup54FTzuEciFV9rxHSJKQ9BfAE6mVPkwpRukmBXPoWcSh3EfBH3 SHiNvvyS8BkrdsVAfwlS01SUbdU7tPNWXcqjW+O404W5a+nhfpgAMr0dMzKELPSb ZLJuwApoPEJQpPGf7+lObqCty/t9JiOjru7BbxRuJCjhr2b/4PrMgM2oYbOIJrmP tOH7S/VnD1VFzxFlfLh6bJqu20izW1nEMIM3VbxN8GkC3Ny0wb58GKVdH7eOmk32 t2oXKcarkDAl59aktlsSOhWHju7+9IFIOiJjSlGvpwlnDL5EnnQ9axNxG/7SiMeQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeegjedggeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt udenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevtdfgkeduudeuveetfeeggfej uddvtdetuefhleeuffeukeeihfejgfeigeduleenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Jun 2021 08:24:27 -0400 (EDT) Date: Fri, 25 Jun 2021 21:24:23 +0900 From: Michael Paquier To: Andrew Dunstan Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix pattern matching logic for logs in TAP tests of pgbench Message-ID: References: <0f49303e-7784-b3ee-200b-cbf67be2eb9e@dunslane.net> <4a58ca30-7d79-8005-b427-9e73f004f457@dunslane.net> <8617bf50-0a00-afdc-0bc8-41ffc7f70f39@dunslane.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2D46iPUpUvdQAjRf" Content-Disposition: inline In-Reply-To: <8617bf50-0a00-afdc-0bc8-41ffc7f70f39@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2D46iPUpUvdQAjRf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 25, 2021 at 06:12:09AM -0400, Andrew Dunstan wrote: > +=A0=A0=A0 =A0=A0=A0 # On Msys, filter out any CRLF. > +=A0=A0=A0 =A0=A0=A0 $contents_raw =3D~ s/\r\n/\n/g if $Config{osname} eq= 'msys'; >=20 > This is completely redundant. The whole point is that slurp_file does > exactly this for you. Thanks. I have managed to duplicate that. > +=A0=A0=A0 =A0=A0=A0 my @contents =3D split("\n", $contents_raw); >=20 > Probably more idiomatic to write split(/\n/,$contents_raw), or > split(/^/, $contents_raw) if you want to keep the line feeds. I have gone with the solution that removes the newlines. This does not change the pattern checks, and that makes printing entries not matching a bit cleaner. Thanks a lot for the investigation! -- Michael --2D46iPUpUvdQAjRf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmDVyvcACgkQnvQgOdby QH3khg//RkUnWZibPWwqhlBbvr3TJ/ZBdWC0TEgikMYPa490rvPXOHMHUFQhjuAK 8kp6OnDr7ERjr+7qJ2gjaLBZTlvgme/E/DkRsHHHD5tQybrswbOEXG52XeYC82QP ZTdzxafk4zVVIhAcYG8Q5XUfzj7Y6OtzdpyB+xFAJnnMTmvb+XsJFg6JdzEF5x1U 62FpdCyAcpU6b1M4NVVoOjHK+LU+o9OTeGO4LRVyb33+7Bh0PYf/Pj+mFVUiQb33 bdTPCtDEv1SfeiYrrK3VLIt/y5AtxEH/pZpm7uBxQnOM56iyVcJq9ULfl5IRcHDi s/dI2hFqm6RPUmUO+NCehkLTDYCLQ77qtva+QgWOKqHwqREcWXd4YHBvhTaRlP5D VfyuQOoJWXeSA6mEep8CwB1+Q1Heq0A5DQFazmyl78HWiAGiaBrVqKSHNu3Y4lrd S0MoRw/0YvCfNqLl15lsA2eebg7A7DMKmEjv1xoFQQW6+9TiBlp85xROdbvcWWIH k78Q4joBEa2yvQ1zEyNi2wKOK4XpuKxadjbcE4VrA3vtMrI1QVa4M6KusJnPeDGV f5lEMTznbvPAxjyRrp4f7geES31JM04hl0PlOfuVBdE6UWilvLOt2q2wIVSGVe+w V/6mlCkxUJT6iYocnurtdyru1R4aEsQoHEBISxyf0nPst3Bwh6I= =Ydo0 -----END PGP SIGNATURE----- --2D46iPUpUvdQAjRf--