You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Make Valgrind return an error even when a non-fatal issue is detected.
By default Valgrind does not exit with an error code when a non-fatal error is detected, e.g. unfreed memory. Use the --error-exitcode option to enabled this behavior. Update some minor issues discovered in the tests as a result. Luckily, no issues were missed in the core code.
This commit is contained in:
@ -117,6 +117,7 @@ testRun(void)
|
||||
String *controlFile = strNew("db/" PG_PATH_GLOBAL "/" PG_FILE_PGCONTROL);
|
||||
PgControlFile control = {.systemId = 0xFACEFACE, .controlVersion = 1002, .catalogVersion = 201707211};
|
||||
Buffer *controlBuffer = bufNew(512);
|
||||
memset(bufPtr(controlBuffer), 0, bufSize(controlBuffer));
|
||||
memcpy(bufPtr(controlBuffer), &control, sizeof(PgControlFile));
|
||||
bufUsedSet(controlBuffer, bufSize(controlBuffer));
|
||||
storagePutNP(storageNewWriteNP(storageTest, controlFile), controlBuffer);
|
||||
|
Reference in New Issue
Block a user