1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-25 00:16:54 +02:00

Add stack trace macros to all functions.

Low-level functions only include stack trace in test builds while higher-level functions ship with stack trace built-in. Stack traces include all parameters passed to the function but production builds only create the parameter list when the log level is set high enough, i.e. debug or trace depending on the function.
This commit is contained in:
David Steele
2018-05-18 11:57:32 -04:00
parent abb9651f4c
commit 52bc073234
141 changed files with 6489 additions and 1179 deletions

View File

@ -24,6 +24,8 @@ Test Run
void
testRun()
{
FUNCTION_HARNESS_VOID();
// -----------------------------------------------------------------------------------------------------------------------------
if (testBegin("pageChecksum()"))
{
@ -74,7 +76,7 @@ testRun()
// Check that assertion fails if page buffer and page size are not divisible
TEST_ERROR(
pageChecksumBufferTest(testPage(0), TEST_PAGE_TOTAL * TEST_PAGE_SIZE - 1, 0, TEST_PAGE_SIZE, 0, 0),
AssertError, "buffer size 131071, page size 8192 are not divisible");
AssertError, "function debug assertion 'pageBufferSize % pageSize == 0' failed");
// Create pages that will pass the test (starting with block 0)
for (unsigned int pageIdx = 0; pageIdx < TEST_PAGE_TOTAL; pageIdx++)
@ -113,4 +115,6 @@ testRun()
testPage(0), TEST_PAGE_TOTAL * TEST_PAGE_SIZE, blockBegin, TEST_PAGE_SIZE, 0xFFFFFFFF, 0xFFFFFFFF),
false, "invalid page buffer");
}
FUNCTION_HARNESS_RESULT_VOID();
}