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 1gAlsQ-00087G-8X for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Oct 2018 01:04:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gAlsO-0008HY-Cs for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Oct 2018 01:04:24 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAlsN-0008HQ-8v for pgsql-hackers@lists.postgresql.org; Fri, 12 Oct 2018 01:04:24 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gAlsG-0005Mj-Rz for pgsql-hackers@postgresql.org; Fri, 12 Oct 2018 01:04:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D909BBF6; Thu, 11 Oct 2018 21:04:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 11 Oct 2018 21:04:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=lqSMBD4GYhAVHg/fApmaRckcOjf Pu9DfY4JerhYiM8k=; b=H8rG3ByuwFMLpbuupKChJQ/sIjJdJLZeyxnNk1EAf+P 23XUSLm11MQxQlxw49Yfmx+p03k5yAIas/R8ZqNVLShQZxnJNTRF/6yN97nMaklS 94DwveVHvLIYVXuUmWhghpeqhEsbpUdMleV9kv+ggRvwGe9PNL9uMfdFRZn7zbEr 0exej3xsmbZMlii8q4Xaq/HzFJfaRYtY4dk9j7NycZU7lgGc1ZtsFpK+Ymf313nq wvWMeGSZTR12dH/wku54aowLLrSclTvp5BATjmHt95Q0T4/gQYinC+oLC+AYaN/5 MgNof4Z+Lv1V3Ul+GyA4lLD6Z0/tOHasGDCdf/q1MdA== 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=lqSMBD 4GYhAVHg/fApmaRckcOjfPu9DfY4JerhYiM8k=; b=pTFPgMzQi3iEASwIb2gESX Lz4pd0gB1YKA9XMmiAEyLqgYM9zRUHnWKSCbaC1VSgUAn7ZiOtJhp3qesep3/jGx DyandX0DRLLdMLXwaQuaFSZ0rBzx/vNEQjEDlZ/juVN/b5ozF6z4Beleotkw8e4B gLV6HyHkTwbhRdXKKNUiDrIUj3jMTza+cKjWZePBQlxuDf2oetdKIzgIAI75e389 9sP1gI0gUdLY2xyR8cUPGJIVXe8I+JaSYYVTwypCtKJV2mvzRwu6FKsNWhz+fj7V jTVovxFCqVVuTrCxd+6lm0Z5BjpmIPGF3K1A0rbDtssgcqvyzSc5qHcntSc50G9Q == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 7A849102D7; Thu, 11 Oct 2018 21:04:12 -0400 (EDT) Date: Thu, 11 Oct 2018 18:04:11 -0700 From: Andres Freund To: Michael Paquier Cc: Postgres hackers , Daniel Gustafsson , Magnus Hagander Subject: Re: pgsql: Add TAP tests for pg_verify_checksums Message-ID: <20181012010411.re53cwcistcpip5j@alap3.anarazel.de> References: <20181012005614.GC26424@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181012005614.GC26424@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-10-12 09:56:14 +0900, Michael Paquier wrote: > On Fri, Oct 12, 2018 at 12:17:57AM +0000, Michael Paquier wrote: > > Add TAP tests for pg_verify_checksums > > > > 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=culicidae&br=HEAD > > 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 failed)/ > > 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. culicidae tests EXEC_BACKEND, so there's an explanation as to why it sometimes behaves differently. But here I don't immediately see how that'd matter. Probably still worth verifying that it's not somehow caused by that. > 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? I don't see how that'd would change anything. A "missing" fflush() isn't a licence to simply throw away buffer contents, so I doubt it's just that. Greetings, Andres Freund