diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-29 08:39:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-04 14:52:35 -0400 |
commit | 36f3bdac032523c6d98022c84059d8ebd69dfdfe (patch) | |
tree | eea45e6d9bbef824151bd098dbc9e06fa70f626c /src/ext/tinytest.c | |
parent | 52ac539b9938af6c47355b67ce1def1236f4ee39 (diff) | |
download | tor-36f3bdac032523c6d98022c84059d8ebd69dfdfe.tar.gz tor-36f3bdac032523c6d98022c84059d8ebd69dfdfe.zip |
Update prefork and postfork NSS code for unit tests.
Diffstat (limited to 'src/ext/tinytest.c')
-rw-r--r-- | src/ext/tinytest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ext/tinytest.c b/src/ext/tinytest.c index 2a475bd917..052fb6483f 100644 --- a/src/ext/tinytest.c +++ b/src/ext/tinytest.c @@ -120,8 +120,10 @@ testcase_run_bare_(const struct testcase_t *testcase) #ifndef NO_FORKING #ifdef TINYTEST_POSTFORK +void tinytest_prefork(void); void tinytest_postfork(void); #else +static void tinytest_prefork(void) { } static void tinytest_postfork(void) { } #endif @@ -185,16 +187,17 @@ testcase_run_forked_(const struct testgroup_t *group, if (opt_verbosity>0) printf("[forking] "); + tinytest_prefork(); pid = fork(); #ifdef FORK_BREAKS_GCOV vproc_transaction_begin(0); #endif + tinytest_postfork(); if (!pid) { /* child. */ int test_r, write_r; char b[1]; close(outcome_pipe[0]); - tinytest_postfork(); test_r = testcase_run_bare_(testcase); assert(0<=(int)test_r && (int)test_r<=2); b[0] = "NYS"[test_r]; |