aboutsummaryrefslogtreecommitdiff
path: root/src/ext
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-31 19:56:23 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-31 19:56:23 -0400
commitfdaa483098d723b4be24a4e861c4280a67a3d4b0 (patch)
tree04c618d00c66d3f07f3c0e1ec84346eb6fbe22e8 /src/ext
parent7e4ac0283ef9c089ebe4da8b85a5f6b5ec84a081 (diff)
parent17f922d3719837fade1888dfa7cc99ac801ad800 (diff)
downloadtor-fdaa483098d723b4be24a4e861c4280a67a3d4b0.tar.gz
tor-fdaa483098d723b4be24a4e861c4280a67a3d4b0.zip
Merge branch 'nss_dh_squashed' into nss_dh_squashed_merged
Diffstat (limited to 'src/ext')
-rw-r--r--src/ext/tinytest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ext/tinytest.c b/src/ext/tinytest.c
index df2cc0b584..2a475bd917 100644
--- a/src/ext/tinytest.c
+++ b/src/ext/tinytest.c
@@ -25,6 +25,7 @@
#ifdef TINYTEST_LOCAL
#include "tinytest_local.h"
#endif
+#define TINYTEST_POSTFORK
#include <stdio.h>
#include <stdlib.h>
@@ -118,6 +119,12 @@ testcase_run_bare_(const struct testcase_t *testcase)
#ifndef NO_FORKING
+#ifdef TINYTEST_POSTFORK
+void tinytest_postfork(void);
+#else
+static void tinytest_postfork(void) { }
+#endif
+
static enum outcome
testcase_run_forked_(const struct testgroup_t *group,
const struct testcase_t *testcase)
@@ -187,6 +194,7 @@ testcase_run_forked_(const struct testgroup_t *group,
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];