You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-05 15:41:11 +03:00
Move logic from postgres/pageChecksum to command/backup/pageChecksum().
The postgres/pageChecksum module was designed as an interface to the C structs for the Perl code. The new C code can do this directly so no need for an interface. Move the remaining test for pgPageChecksum() into the postgres/interface test module.
This commit is contained in:
@ -178,6 +178,19 @@ testRun(void)
|
||||
TEST_RESULT_STR_Z(pgXactPath(PG_VERSION_10), "pg_xact", "check pg_xact name");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("pgPageChecksum()"))
|
||||
{
|
||||
unsigned char page[PG_PAGE_SIZE_DEFAULT];
|
||||
|
||||
// Checksum for 0xFF fill, page 0x00
|
||||
memset(page, 0xFF, PG_PAGE_SIZE_DEFAULT);
|
||||
TEST_RESULT_U16_HEX(pgPageChecksum(page, 0), 0x0E1C, "check for 0xFF filled page, block 0");
|
||||
|
||||
// Checksum for 0xFF fill, page 0xFF
|
||||
TEST_RESULT_U16_HEX(pgPageChecksum(page, 999), 0x0EC3, "check for 0xFF filled page, block 999");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("pgWalFromBuffer() and pgWalFromFile()"))
|
||||
{
|
||||
|
Reference in New Issue
Block a user