You've already forked pgbackrest
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:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user