From 15296d06bd276a6bfb9601824d13228d5090aa9f Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 22 Mar 2012 18:24:43 -0400 Subject: [PATCH] Use libevent_global_shutdown() to clean up in unit tests. This bumps coverage up by a few lines. Every little bit helps. --- test/regress_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/regress_main.c b/test/regress_main.c index 937f339d..96b5b7ee 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -264,6 +264,9 @@ basic_test_cleanup(const struct testcase_t *testcase, void *ptr) } } + if (testcase->flags & TT_FORK) + libevent_global_shutdown(); + free(data); return 1; @@ -393,6 +396,8 @@ main(int argc, const char **argv) if (tinytest_main(argc,argv,testgroups)) return 1; + libevent_global_shutdown(); + return 0; }