[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Fix intermittent failures of test_circuitpadding_wronghop().



commit 6243133a71e816ba9a462c9fa667c63729483627
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Mon Jan 21 12:36:33 2019 +0200

    Fix intermittent failures of test_circuitpadding_wronghop().
    
    We fix it by disabling the scheduling of actual padding.
    Fixes #29122.
---
 changes/bug29122               | 3 +++
 src/test/test_circuitpadding.c | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/changes/bug29122 b/changes/bug29122
new file mode 100644
index 000000000..020052ff8
--- /dev/null
+++ b/changes/bug29122
@@ -0,0 +1,3 @@
+  o Minor bugfixes (unit tests):
+    - Fix intermittent failures on an adaptive padding unittest. Fixes bug
+      29122; bugfix on 0.4.0.1-alpha
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index f4d003969..61bd174e6 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,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits