]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix allocation counting in clean_v2_descs_as_dir test.
authorNick Mathewson <nickm@torproject.org>
Wed, 12 Aug 2020 18:25:46 +0000 (14:25 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 12 Aug 2020 18:25:46 +0000 (14:25 -0400)
Without this fix, running this test on its own would fail.

Fixes bug 40099. Bugfix on ade5005853c17b3 in 0.2.8.1-alpha.

changes/bug40099 [new file with mode: 0644]
src/test/test_rendcache.c

diff --git a/changes/bug40099 b/changes/bug40099
new file mode 100644 (file)
index 0000000..278ede2
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (tests):
+    - Fix the behavior of the rend_cache/clean_v2_descs_as_dir when run on
+      its own.  Previously, it would exit with an error.
+      Fixes bug 40099; bugfix on 0.2.8.1-alpha.
index 4f544cf21c312ad3f64dc6ac874e42eada2c7a35..93f9f82953ea5792990d63b90706b5178cc787bd 100644 (file)
@@ -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
 };
-