aboutsummaryrefslogtreecommitdiff
path: root/src/test/testing_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-11 15:36:54 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-13 12:35:22 -0400
commitd811ce2421dcf1684db7e34f2b5998d9f360d5fb (patch)
treef914d9ef7ab706dac95279ce4c95f8e8b0fd5535 /src/test/testing_common.c
parentc317e78dd75b6bf9c195c9bef5a0b8300d55411a (diff)
downloadtor-d811ce2421dcf1684db7e34f2b5998d9f360d5fb.tar.gz
tor-d811ce2421dcf1684db7e34f2b5998d9f360d5fb.zip
Add postfork support for nss
We need this in our unit tests, since otherwise NSS will notice we've forked and start cussing us out. I suspect we'll need a different hack for daemonizing, but this should be enough for tinytest to work.
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r--src/test/testing_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index 32d7bf7f0e..1611a54b6a 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -223,6 +223,13 @@ an_assertion_failed(void)
tinytest_set_test_failed_();
}
+void tinytest_postfork(void);
+void
+tinytest_postfork(void)
+{
+ crypto_postfork();
+}
+
/** Main entry point for unit test code: parse the command line, and run
* some unit tests. */
int