pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
Date: Thu, 11 Oct 2018 18:04:11 -0700
Message-ID: <20181012010411.re53cwcistcpip5j@alap3.anarazel.de> (raw)
In-Reply-To: <20181012005614.GC26424@paquier.xyz>
References: <E1gAl9R-00015q-Nl@gemulon.postgresql.org>
	<20181012005614.GC26424@paquier.xyz>

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




view thread (76+ messages)  latest in thread

Message-ID: <20181012010411.re53cwcistcpip5j@alap3.anarazel.de>
Permalink:  ../20181012010411.re53cwcistcpip5j@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20181012010411.re53cwcistcpip5j@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, michael@paquier.xyz, pgsql-hackers@postgresql.org, daniel@yesql.se, magnus@hagander.net
  Subject: Re: pgsql: Add TAP tests for pg_verify_checksums
  In-Reply-To: <20181012010411.re53cwcistcpip5j@alap3.anarazel.de>
  References: <E1gAl9R-00015q-Nl@gemulon.postgresql.org> <20181012005614.GC26424@paquier.xyz> <20181012010411.re53cwcistcpip5j@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox