aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_consdiffmgr.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-15 17:22:12 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-15 17:22:12 -0400
commitdae12425328f1ba69498d5dec5ce747af7e19013 (patch)
treec01b22bc96acc58e46e5017ab8eb26baa0342a94 /src/test/test_consdiffmgr.c
parentec6b2bbf9bb561e34f9fbe6663d1eb691604348d (diff)
parent9e3f3041139f60c5d109aff345bc560490329b10 (diff)
downloadtor-dae12425328f1ba69498d5dec5ce747af7e19013.tar.gz
tor-dae12425328f1ba69498d5dec5ce747af7e19013.zip
Merge branch 'ahf_bugs_21667_2_squashed'
Diffstat (limited to 'src/test/test_consdiffmgr.c')
-rw-r--r--src/test/test_consdiffmgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c
index 9d0c5b5b71..2e5dd59292 100644
--- a/src/test/test_consdiffmgr.c
+++ b/src/test/test_consdiffmgr.c
@@ -759,9 +759,11 @@ test_consdiffmgr_cleanup_old_diffs(void *arg)
consensus_cache_entry_incref(hold_ent); // incref, so it is preserved.
/* Now add an even-more-recent consensus; this should make all previous
- * diffs deletable */
+ * diffs deletable, and make delete */
tt_int_op(0, OP_EQ, consdiffmgr_add_consensus(md_body[3], md_ns[3]));
- tt_int_op(2 * n_diff_compression_methods(), OP_EQ, consdiffmgr_cleanup());
+ tt_int_op(2 * n_diff_compression_methods() +
+ (n_consensus_compression_methods() - 1) , OP_EQ,
+ consdiffmgr_cleanup());
tt_int_op(CONSDIFF_NOT_FOUND, OP_EQ,
lookup_diff_from(&ent, FLAV_MICRODESC, md_body[0]));