Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBFKB-000842-K9 for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 08:31:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gBFK7-00063u-Tt for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Oct 2018 08:30:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBFK5-00063d-Vm for pgsql-hackers@lists.postgresql.org; Sat, 13 Oct 2018 08:30:59 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gBFJw-0002sz-S6 for pgsql-hackers@postgresql.org; Sat, 13 Oct 2018 08:30:56 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9017B21F8A; Sat, 13 Oct 2018 04:30:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sat, 13 Oct 2018 04:30:47 -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=SKGmJ7N0dhfSKpMM4iCo99D8W7O ENlRUN9Z9Bf0V4MU=; b=EylvFgGdusCqmsVYIlSvx78LQEvtY8GJUN933uWbCw0 fDTwH1PBupI7bZI8J0gXji6a5ivjUeXaD7q50k7YtgKYxp/ed5Am5smw74ew6iYh tVuSJBQIXbNz4A+4TYk4xYHKncjF17wECuhbMYkpxP3FMSHIPEqPAWVFeAYkurcf GBb1h0YBHRsd0KHi1M0Yo3qQuVhKMs631Z5hoTZFhNSDcP8v77ziOC9XguvM8CFe pInYmPYlqagAfcBchaQB3Hu6it6jC5vO9pWoLJ/J7azXtiGG46InOnZdmAfgbMMB dNv8colYUxOSIF5iDHuGhyvSxcREqmxEydUbJTF+LCA== 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=fm1; bh=SKGmJ7 N0dhfSKpMM4iCo99D8W7OENlRUN9Z9Bf0V4MU=; b=AN8ipRJJzHGR9UesEJjVbm JWB0sQYCQkMjcKIZsxGU/WBitv2fGKjdAnscCL2r1SCYZt2PQsLqDw/IeJYDyL8p aRwJ6yysb1b5Rl0y/nCeYEghdm1nwgWqe4ZW7zelU5elFkDmgWVzcVyrnsY8tJsb fcrmJrTpiHwmGCkX6xSKP79T3yfmVufTb7JkP0Ly0O6nHNNxnR2AMk2xe/hO2VNB sqk8UVyfgLItrxBQEMbjQf5YN2NFlSxLSPlHA8i0xnzjj1kB54PSA31xcYOombXS IgoGT/GcTiRay6k18FnpGdm7tKzqhSTcfpPvly1At4qPdE8ywCXYhinW/9hZvIAw == X-ME-Sender: X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 819B6102E9; Sat, 13 Oct 2018 04:30:43 -0400 (EDT) Date: Sat, 13 Oct 2018 17:30:40 +0900 From: Michael Paquier To: Michael Banck Cc: Andres Freund , Postgres hackers , Daniel Gustafsson , Magnus Hagander , Andrew Dunstan Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181013083040.GF30064@paquier.xyz> References: <20181012005614.GC26424@paquier.xyz> <20181012010411.re53cwcistcpip5j@alap3.anarazel.de> <20181012013918.GA30064@paquier.xyz> <20181012015319.ezsb2cxb52ulbqgx@alap3.anarazel.de> <20181012020758.GB30064@paquier.xyz> <20181012024118.q3jwio7gf52nsrmm@alap3.anarazel.de> <20181012031158.GD30064@paquier.xyz> <20181012060543.GE30064@paquier.xyz> <20181012101447.GA13287@nighthawk.caipicrew.dd-dns.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MFZs98Tklfu0WsCO" Content-Disposition: inline In-Reply-To: <20181012101447.GA13287@nighthawk.caipicrew.dd-dns.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --MFZs98Tklfu0WsCO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 12, 2018 at 12:14:48PM +0200, Michael Banck wrote: > On Fri, Oct 12, 2018 at 03:05:43PM +0900, Michael Paquier wrote: >> On Fri, Oct 12, 2018 at 12:11:58PM +0900, Michael Paquier wrote: >>> Agreed. I am just working on a patch for v11- which uses a >>> whitelist-based method instead of what is present now. Reverting the >>> tests to put the buildfarm to green could be done, but that's not the >>> root of the problem. >=20 > I think that's the right solution; the online verification patch adds > even more logic to the blacklist so getting rid of it in favor of a > whitelist is +1 with me. Thanks Michael for the input! >> So, I have coded this thing, and finish with the attached. The >> following file patterns are accepted for the checksums: >> . >> _ >> _. >> I have added some tests on the way to make sure that all the patterns >> get covered. Please note that this skips the temporary files. >=20 > Maybe also add some correct (to be scanned) but non-empty garbage files > later on that it should barf on? I was not sure about doing that in the main patch so I tweaked manually the test to make sure that the tool still complained with "could not read block" as it should. That's easy enough to add, so I'll add them with multiple file patterns. Those are cheap checks as well if they are placed in global/. Another problem that the patch has is that it is not using forkname_to_number() to scan for all the fork types, and I forgot init forks in the previous version. Using forkname_to_number() also makes the tool more bug-proof, it is also not complicated to plug into the existing patch. Anyway, I have a bit of a problem here, which prevents me to stay in front of a computer or to look at a screen for more than a couple of minutes in a row for a couple of days at least, and I don't like to keep the buildfarm unhappy for the time being. There are three options: 1) Revert the TAP tests of pg_verify_checksums. 2) Push the patch which adds new entries for EXEC_BACKEND files in the skip list. That's a short workaround, and that would allow default deployments of Postgres to use the tool. 3) Finish the patch with the whitelist approach. I can do 1) or 2) in my condition. 3) requires more work than I can do now, though the patch to do is getting in shape, so the buildfarm would stay unhappy. Any preference of the course of action to take?=20 -- Michael --MFZs98Tklfu0WsCO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlvBrTAACgkQnvQgOdby QH2vSQ//RtRbULzxqwEzPzbQuL2xL+vhvIK5qpVs+BQC8gzw4o/y11JfTRmyLo7e ixOYLoerKuqpuW0akRzsNqeBxtCZDiPEfZcjlp6gI0lnffYelXI1+8YEeBb9PFnN Ja70Dg24FFcR+s6UbUbaOP5tHQJTX85q3i659yQWl8T+F8kPw03TgIzsyNNhhuyH 42mknlRESxT6fhel5r3oIGxaXdQMDLbnCN+ggmOivl9VO8yuPNJMykr3yKgKqQ48 j46giH0H1fjAcdXVNmVx0e+CvNvZFBPq3XhMhTpfis/gH8n0/8oLNMHBe4y4RbHL HpCQCzWfH6U32ktHFCCo/LCR3wN0I2VgV3zIaQf17bykactxvGNapzybSqfXt/29 QhwpFckbUqs4YHf7pgk6UgJ+BwNd/xb43mZ+MMiCvVL0ne8CPONECUYWN9CtTtWX DIzgNS6SUSxtNk3CNPiSiPFn3Vn8fro9qrtOW/jDCnmBlNmZ2nm6i6x5maF965J9 1jNoiuVO9hyU0gPv9A8bfECRRQvhT0seUy7h6Y0+gwIXyh1TWyEaXo1dN1oezPfh OoOzxY6woZ93p/UCWdvJQhdu65t8YFYG7T0Ekwsl9txW/PN21E7T99iD549jUCPP WvPK68PAhVqgPxAoEkK5lAFj/mM/Ae8ObARrMn84LdlX/fkcStQ= =HIhJ -----END PGP SIGNATURE----- --MFZs98Tklfu0WsCO--