[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Bug 29500: Attempt to fix the tokens test.
commit 1f48c6cd83d66c904e7339e1ff60f5e7c5f6bbf4
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date: Wed Feb 27 00:27:22 2019 +0000
Bug 29500: Attempt to fix the tokens test.
Cancel the padding timer by changing order of sent vs recv (sent cancels).
---
src/test/test_circuitpadding.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c
index eee1edc50..077529a0d 100644
--- a/src/test/test_circuitpadding.c
+++ b/src/test/test_circuitpadding.c
@@ -1004,9 +1004,8 @@ test_circuitpadding_tokens(void *arg)
mi = client_side->padding_info[0];
// Pretend a non-padding cell was sent
- // XXX: This messes us up.. Padding gets scheduled..
- circpad_cell_event_nonpadding_sent((circuit_t*)client_side);
circpad_cell_event_nonpadding_received((circuit_t*)client_side);
+ circpad_cell_event_nonpadding_sent((circuit_t*)client_side);
/* We have to save the infinity bin because one inf delay
* could have been chosen when we transition to burst */
circpad_hist_token_t inf_bin = mi->histogram[4];
@@ -1105,7 +1104,8 @@ test_circuitpadding_tokens(void *arg)
/* 2.c. Bin 0 */
{
- tt_int_op(mi->histogram[0], OP_EQ, 1);
+ tt_int_op(mi->histogram[0], OP_EQ, 0);
+ mi->histogram[0] = 1;
circpad_machine_remove_higher_token(mi,
state->start_usec/2);
tt_int_op(mi->histogram[0], OP_EQ, 0);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits