summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-08-12 14:25:46 -0400
committerNick Mathewson <nickm@torproject.org>2020-08-12 14:25:46 -0400
commitf9bb49d870045fa6e1a2570a65f0583066d8359d (patch)
treea80b93df554c09da4e608dfc024521c6314f85cc /src
parentf5b94715479e9b7bef5675ab72c8b2e260bcb830 (diff)
downloadtor-f9bb49d870045fa6e1a2570a65f0583066d8359d.tar.gz
tor-f9bb49d870045fa6e1a2570a65f0583066d8359d.zip
Fix allocation counting in clean_v2_descs_as_dir test.
Without this fix, running this test on its own would fail. Fixes bug 40099. Bugfix on ade5005853c17b3 in 0.2.8.1-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/test/test_rendcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index 4f544cf21c..93f9f82953 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -1101,6 +1101,7 @@ test_rend_cache_clean_v2_descs_as_dir(void *data)
desc->timestamp = now;
desc->pk = pk_generate(0);
e->parsed = desc;
+ rend_cache_increment_allocation(rend_cache_entry_allocation(e));
digestmap_set(rend_cache_v2_dir, key, e);
/* Set the cutoff to minus 10 seconds. */
@@ -1250,4 +1251,3 @@ struct testcase_t rend_cache_tests[] = {
test_rend_cache_validate_intro_point_failure, 0, NULL, NULL },
END_OF_TESTCASES
};
-