aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_circuitpadding.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-01-21 12:36:33 +0200
committerNick Mathewson <nickm@torproject.org>2019-01-22 14:30:43 -0500
commit6243133a71e816ba9a462c9fa667c63729483627 (patch)
tree68ed4283957d7abc48e3ecdcc2f6fc862c6bdc38 /src/test/test_circuitpadding.c
parentd1af4d65df8b5ef8049707029335049db147829f (diff)
downloadtor-6243133a71e816ba9a462c9fa667c63729483627.tar.gz
tor-6243133a71e816ba9a462c9fa667c63729483627.zip
Fix intermittent failures of test_circuitpadding_wronghop().
We fix it by disabling the scheduling of actual padding. Fixes #29122.
Diffstat (limited to 'src/test/test_circuitpadding.c')
-rw-r--r--src/test/test_circuitpadding.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index f4d003969e..61bd174e6c 100644
--- a/src/test/test_circuitpadding.c
+++ b/src/test/test_circuitpadding.c
@@ -1239,6 +1239,10 @@ test_circuitpadding_wronghop(void *arg)
MOCK(circuitmux_attach_circuit, circuitmux_attach_circuit_mock);
+ /* Mock this function so that our cell counting tests don't get confused by
+ * padding that gets sent by scheduled timers. */
+ MOCK(circpad_machine_schedule_padding,circpad_machine_schedule_padding_mock);
+
client_side = (circuit_t *)origin_circuit_new();
dummy_channel.cmux = circuitmux_alloc();
relay_side = (circuit_t *)new_fake_orcirc(&dummy_channel,