return test_deinit();
}
+void test_forked_end(void)
+{
+ i_set_error_handler(default_error_handler);
+ i_set_fatal_handler(default_fatal_handler);
+
+ i_free_and_null(expected_error_str);
+ i_free_and_null(expected_fatal_str);
+ i_free_and_null(test_prefix);
+ t_pop_last_unsafe(); /* as we were within a T_BEGIN { tests[i].func(); } T_END */
+}
+
void ATTR_NORETURN
test_exit(int status)
{
#define FATAL_NAMELESS(x) x, /* Were you to want to use the X trick but not name the tests */
#define FATAL_NAMED(x) { .name = #x , .func = x },
+/* If a child is forked within test context, but wants to operate outside it,
+ then this will avoid valgrind leak errors */
+void test_forked_end(void);
/* If a fork() wants to exit(), then this will avoid valgrind leak errors */
void test_exit(int status) ATTR_NORETURN;