]> granicus.if.org Git - libevent/commitdiff
Use libevent_global_shutdown() to clean up in unit tests.
authorNick Mathewson <nickm@torproject.org>
Thu, 22 Mar 2012 22:24:43 +0000 (18:24 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 22 Mar 2012 22:24:48 +0000 (18:24 -0400)
This bumps coverage up by a few lines. Every little bit helps.

test/regress_main.c

index 937f339ddaaf9908029eef65d9ea02ad0be82315..96b5b7ee2d68c926f3b4d3f7a4ecc9e0dbef822a 100644 (file)
@@ -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;
 }