1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02: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:
David Steele
2020-03-05 16:12:54 -05:00
parent 3796b74dca
commit e55443c890
10 changed files with 81 additions and 176 deletions

View File

@ -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()"))
{