diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2019-02-27 00:27:22 +0000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-04-05 12:13:19 +1000 |
commit | 1f48c6cd83d66c904e7339e1ff60f5e7c5f6bbf4 (patch) | |
tree | 306e640b69462ff11c0eb1c581049a404aa78cd2 /src | |
parent | d016bbaa7dfb3586c682c0070b79e174e8a73c19 (diff) | |
download | tor-1f48c6cd83d66c904e7339e1ff60f5e7c5f6bbf4.tar.gz tor-1f48c6cd83d66c904e7339e1ff60f5e7c5f6bbf4.zip |
Bug 29500: Attempt to fix the tokens test.
Cancel the padding timer by changing order of sent vs recv (sent cancels).
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_circuitpadding.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test_circuitpadding.c b/src/test/test_circuitpadding.c index eee1edc50c..077529a0dc 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); |