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 1gAlkh-0007oE-Bw for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Oct 2018 00:56:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAlke-00066A-Ob for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Oct 2018 00:56:24 +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 1gAlke-000663-DZ for pgsql-hackers@lists.postgresql.org; Fri, 12 Oct 2018 00:56:24 +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 1gAlka-0002r3-O3 for pgsql-hackers@postgresql.org; Fri, 12 Oct 2018 00:56:23 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 17C6521A1E; Thu, 11 Oct 2018 20:56:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 11 Oct 2018 20:56:20 -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=3N+YMYcFM7te71GihNlNagGd/uR O/TuMzOh6rTcZ6ug=; b=rcG43okfWnZA1X/KKnesbRFXXLKcYZkHu31ByYE4Nkg pYg5ncGx+32B9UNRBraAPYotOj+Wu7HXzKK3neVevXLOhYs7CuAE9cJeDmFtlZ16 +Q4TpDcZKxzrd2QUkJ0wVeNBqCY7VYNTHMq+x5RBn/bftZz7lvIAIJB5HTJ7IG6Y YgClrT2YqPyAF+fbAR7W9yJc0Dtxwd7lQI8asdLeJHDfIeUB4FQPfftjVprkqKs1 emyqcRK/2KvSqrv3CB8qYXQnmB8VqSPr6ee/aNvTIOY3ir/jIpyT8WiQYP8DLq9Q qUKxirL1wAFn0wCZHBmD9tJl3AqOuwUOWcFAl4rJ18g== 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=3N+YMY cFM7te71GihNlNagGd/uRO/TuMzOh6rTcZ6ug=; b=eaXvshYmitDrpbFNhqKaah b1X/KO2l8P0G+Sb+/seNX45NPoL23qmDrtJvzZEJoHYHsZGWO693qn+s6mdy2ijN U1bdVXiaGAmghVSdzIBMVku312cGZMBUELKWm2oPQ69G3ZObGg1XRDNQH0OC/8Zh 8GrqYa3McFFGVvdJ81XfmPfbo9RF6vPo8H0x9qzqGMi+q68JpL3gMDHBP1IY2+Qk Xrj9jqn9ovWLaN5apbzh9084dx2DkISbNX71/RYH2JWyRw41B4UpZ9Z478L8QdvS PO/l+c7QgjRYDZDCCnS+stwTEKuOrheOlQTLQnqJgWcZJVreU7b/BwvVUriTnrwA == 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 E5214102D5; Thu, 11 Oct 2018 20:56:17 -0400 (EDT) Date: Fri, 12 Oct 2018 09:56:14 +0900 From: Michael Paquier To: Postgres hackers Cc: Daniel Gustafsson , Magnus Hagander Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181012005614.GC26424@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kVXhAStRUZ/+rrGn" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --kVXhAStRUZ/+rrGn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 12, 2018 at 12:17:57AM +0000, Michael Paquier wrote: > Add TAP tests for pg_verify_checksums >=20 > All options available in the utility get coverage: > - Tests with disabled page checksums. > - Tests with enabled test checksums. > - Emulation of corruption and broken checksums with a full scan and > single relfilenode scan. culicidae is failing after this commit in an interesting way, so we really needed some tests for this utility: https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=3Dculicidae&br= =3DHEAD ok 7 - fails with corrupted data status (got 1 vs expected 1) not ok 8 - fails with corrupted data stdout /(?^:Bad checksums:.*1)/ # Failed test 'fails with corrupted data stdout /(?^:Bad checksums:.*1)/' # at t/002_actions.pl line 57. # '' # doesn't match '(?^:Bad checksums:.*1)' not ok 9 - fails with corrupted data stderr /(?^:checksum verification fail= ed)/ So the checksum failure is happening, but the output is not present. What's not clear to me is that all the other hosts running Debian SID don't complain, and that the follow-up test on a single relfilenode is able to pass with a test much similar to the previous one. Is the issue that we should just call fflush() on stderr and stdout at the end of main() in pg_verify_checksum.c? Shouldn't we back-patch that? -- Michael --kVXhAStRUZ/+rrGn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlu/8S4ACgkQnvQgOdby QH14SA//YSTRp7b9BSbJ2fqs2i0ozx7UTzTQY6KvDlcpySLTYyTwvjVRUOf/SLHf ixnwXo9IbrjX7KlJXMeZU4j+0Q1r7vq0dc/ZCwotc9XcYASmL34ymO706sYe2ts7 aNz+SRtuI4Rfa5wjzmO5Kk1PBdOP7hczgzUdKKZRUwWuGSqknPOhi4AHtoxAXwLk JnA01/v2kTbgNQdUYxD/Yw5q6EjDgKnNAIEOTK+8IGc4EdnRoLJRcVsak2E47mlL iz2vYbcFoiJ8Sm3t6Z2LsXT+viIkpcoikMTrxEc6JjRJ+H7pZlHUbdA9nYBZNqVD /7vNAxe+SGGiFxSbQH/79H1WjLBl7QyzkFvACLjzktxufFdnwaPFChrz7zu97mqq 6LzXLhtw0QDRlx5MPbwPP2c/lRcygsT0YO5Wh73HkUhuA1/1bMSSX+NjGGu0q4b+ KSbAxmyDb8rkekGsE6nlbQlillY9Pk9H3VqyPc9jTIzjd5VkIGyEb1e830VAs3Yz ngAdA4bmXzegLuD8vnxKZjMYoX03EJkSSP8019vSNWMvjgkWbvXfD9RTR2gM+TIE 2WoDlRPF6/5iySV21PBBkunNAFHyK1vXF96RlTua+1QrFKORC4uAWDNPygxlhzTR XK0vSGu8NvYxehDtt713tu4HTg5Uynsvntp/GM7zzrLzC72E0uE= =2eic -----END PGP SIGNATURE----- --kVXhAStRUZ/+rrGn--