You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Improve fork harness to allow multiple children and setup pipes automatically.
There was a lot of extra boilerplate involved in setting up pipes so that is now automated. In some cases testing with multiple children is useful so allow that as well.
This commit is contained in:
@ -290,12 +290,11 @@ testRun(void)
|
||||
// Test in a fork so the process does not actually exit
|
||||
HARNESS_FORK_BEGIN()
|
||||
{
|
||||
HARNESS_FORK_CHILD()
|
||||
HARNESS_FORK_CHILD_BEGIN(UnhandledError.code, false)
|
||||
{
|
||||
THROW(TestChildError, "does not get caught!");
|
||||
}
|
||||
|
||||
HARNESS_FORK_CHILD_EXPECTED_EXIT_STATUS_SET(UnhandledError.code);
|
||||
HARNESS_FORK_CHILD_END();
|
||||
}
|
||||
HARNESS_FORK_END();
|
||||
}
|
||||
|
Reference in New Issue
Block a user