diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-10 11:00:07 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-10 11:01:13 -0400 |
commit | 95fa7d1cf82c68d7d39f423cf71fa8e097662de3 (patch) | |
tree | 5dd9be715a3d977ec865fed0bcf24d806548b2f2 /src/test/test_channelpadding.c | |
parent | 0266c4ac819d9c835a77a0c1e0334f26f60f6f77 (diff) | |
download | tor-95fa7d1cf82c68d7d39f423cf71fa8e097662de3.tar.gz tor-95fa7d1cf82c68d7d39f423cf71fa8e097662de3.zip |
In channelpadding tests that touch libevent, call event_reinit().
This is necessary to avoid crashes and test failures on kevent-based
systems.
Fixes bug 22209; bug not in any released Tor.
Diffstat (limited to 'src/test/test_channelpadding.c')
-rw-r--r-- | src/test/test_channelpadding.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c index cffc8d0843..ba9769444e 100644 --- a/src/test/test_channelpadding.c +++ b/src/test/test_channelpadding.c @@ -258,6 +258,9 @@ test_channelpadding_timers(void *arg) channelpadding_decision_t decision; channel_t *chans[CHANNELS_TO_TEST]; (void)arg; + + tor_libevent_postfork(); + connection_array = smartlist_new(); monotime_init(); @@ -349,6 +352,8 @@ test_channelpadding_consensus(void *arg) int64_t val; (void)arg; + tor_libevent_postfork(); + /* * Params tested: * nf_pad_before_usage @@ -723,6 +728,8 @@ test_channelpadding_decide_to_pad_channel(void *arg) connection_array = smartlist_new(); (void)arg; + tor_libevent_postfork(); + monotime_init(); timers_initialize(); setup_full_capture_of_logs(LOG_WARN); |