Re: More tests to stress directly checksum_impl.h

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, David Steele <david(at)pgmasters(dot)net>
Subject: Re: More tests to stress directly checksum_impl.h
Date: 2020-03-07 05:06:30
Message-ID: 20200307050630.GD1531@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Mar 06, 2020 at 03:04:27PM -0500, Tom Lane wrote:
> Between that and the BLCKSZ dependency, it's not clear that we can
> test this with just a plain old expected-file test case. Might
> need to fall back to a TAP test.

Perhaps the dependency of page.sql on 8kB pages could be improved,
still I am not sure either that testing checksums is worth the
complexity of a new TAP test dependent on pageinspect (5a9323e has
removed such a dependency recently for example).

> Another way would be variant output files, which could be a sane
> solution if we put this in its own test script.

An extra option would be to just choose values which have the same
ordering as long as these are enough to break with changes in the
formula, as mentioned by David, and add a comment about this
assumption in the tests. I am not sure either if this option has more
advantages than the others, but it has at least the merit to be the
simplest one.

(It is kind of hard to find a qemu image with big endian lately?)
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Bandy 2020-03-07 05:37:37 [PATCH] Add tests for integrity violation error fields
Previous Message Dilip Kumar 2020-03-07 04:29:38 Re: Fastpath while arranging the changes in LSN order in logical decoding