Re: More tests to stress directly checksum_impl.h - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: More tests to stress directly checksum_impl.h
Date
Msg-id 20200307050630.GD1531@paquier.xyz
Whole thread Raw
In response to Re: More tests to stress directly checksum_impl.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: More tests to stress directly checksum_impl.h  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Fastpath while arranging the changes in LSN order in logical decoding
Next
From: Chris Bandy
Date:
Subject: [PATCH] Add tests for integrity violation error fields