aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_cell_queue.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2014-05-12 18:23:34 -0700
committerAndrea Shepard <andrea@torproject.org>2014-05-12 18:23:34 -0700
commit39d4e67be8283b2a7141a7aa8342d30e27f47e6f (patch)
treedbc602ce1470c3e8c7b2d13ec89336464b563956 /src/test/test_cell_queue.c
parent17435384c050b29cd3c70819ac7176c407f4d1bb (diff)
downloadtor-39d4e67be8283b2a7141a7aa8342d30e27f47e6f.tar.gz
tor-39d4e67be8283b2a7141a7aa8342d30e27f47e6f.zip
Add --disable-mempools configure option
Diffstat (limited to 'src/test/test_cell_queue.c')
-rw-r--r--src/test/test_cell_queue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/test_cell_queue.c b/src/test/test_cell_queue.c
index 1eac073105..92629823ec 100644
--- a/src/test/test_cell_queue.c
+++ b/src/test/test_cell_queue.c
@@ -16,7 +16,10 @@ test_cq_manip(void *arg)
cell_t cell;
(void) arg;
+#ifdef ENABLE_MEMPOOLS
init_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
+
cell_queue_init(&cq);
tt_int_op(cq.n, ==, 0);
@@ -96,7 +99,10 @@ test_cq_manip(void *arg)
packed_cell_free(pc_tmp);
cell_queue_clear(&cq);
+
+#ifdef ENABLE_MEMPOOLS
free_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
}
static void
@@ -108,7 +114,9 @@ test_circuit_n_cells(void *arg)
(void)arg;
+#ifdef ENABLE_MEMPOOLS
init_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
pc1 = packed_cell_new();
pc2 = packed_cell_new();
@@ -137,7 +145,9 @@ test_circuit_n_cells(void *arg)
circuit_free(TO_CIRCUIT(or_c));
circuit_free(TO_CIRCUIT(origin_c));
+#ifdef ENABLE_MEMPOOLS
free_cell_pool();
+#endif /* ENABLE_MEMPOOLS */
}
struct testcase_t cell_queue_tests[] = {