aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-12-23 16:40:20 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-12-23 16:40:20 +0000
commit92abcea04fa67e69bb5951049e945356ceae4670 (patch)
treeb147dbe79dcc74c729f61a9262dd638d68637bc5 /test
parente6c42dc71175916c01074f5605afc5b3257fe725 (diff)
downloadrspamd-92abcea04fa67e69bb5951049e945356ceae4670.tar.gz
rspamd-92abcea04fa67e69bb5951049e945356ceae4670.zip
[Project] Support mempool flags
Diffstat (limited to 'test')
-rw-r--r--test/rspamd_dns_test.c4
-rw-r--r--test/rspamd_mem_pool_test.c6
-rw-r--r--test/rspamd_radix_test.c4
-rw-r--r--test/rspamd_test_suite.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/test/rspamd_dns_test.c b/test/rspamd_dns_test.c
index 6b12746ae..25c28528e 100644
--- a/test/rspamd_dns_test.c
+++ b/test/rspamd_dns_test.c
@@ -70,11 +70,11 @@ rspamd_dns_test_func ()
cfg = (struct rspamd_config *)g_malloc (sizeof (struct rspamd_config));
bzero (cfg, sizeof (struct rspamd_config));
- cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL);
+ cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
cfg->dns_retransmits = 2;
cfg->dns_timeout = 0.5;
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL);
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
s = rspamd_session_create (pool, session_fin, NULL, NULL, NULL);
diff --git a/test/rspamd_mem_pool_test.c b/test/rspamd_mem_pool_test.c
index 61b9a7a94..61b4efe3f 100644
--- a/test/rspamd_mem_pool_test.c
+++ b/test/rspamd_mem_pool_test.c
@@ -20,7 +20,7 @@ rspamd_mem_pool_test_func ()
pid_t pid;
int ret;
- pool = rspamd_mempool_new (sizeof (TEST_BUF), NULL);
+ pool = rspamd_mempool_new (sizeof (TEST_BUF), NULL, 0);
tmp = rspamd_mempool_alloc (pool, sizeof (TEST_BUF));
tmp2 = rspamd_mempool_alloc (pool, sizeof (TEST_BUF) * 2);
tmp3 = rspamd_mempool_alloc_shared (pool, sizeof (TEST_BUF));
@@ -32,8 +32,8 @@ rspamd_mem_pool_test_func ()
g_assert (strncmp (tmp, TEST_BUF, sizeof (TEST_BUF)) == 0);
g_assert (strncmp (tmp2, TEST2_BUF, sizeof (TEST2_BUF)) == 0);
g_assert (strncmp (tmp3, TEST_BUF, sizeof (TEST_BUF)) == 0);
-
+
rspamd_mempool_delete (pool);
rspamd_mempool_stat (&st);
-
+
}
diff --git a/test/rspamd_radix_test.c b/test/rspamd_radix_test.c
index 5a42b36e5..dda0bff36 100644
--- a/test/rspamd_radix_test.c
+++ b/test/rspamd_radix_test.c
@@ -148,7 +148,7 @@ rspamd_btrie_test_vec (void)
gsize i;
gpointer val;
- pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "btrie");
+ pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "btrie", 0);
tree = btrie_init (pool);
while (t->ip != NULL) {
@@ -238,7 +238,7 @@ rspamd_radix_test_func (void)
addrs[i].mask6 = ottery_rand_range(128);
}
- pool = rspamd_mempool_new (65536, "btrie");
+ pool = rspamd_mempool_new (65536, "btrie", 0);
btrie = btrie_init (pool);
msg_notice ("btrie performance (%z elts)", nelts);
diff --git a/test/rspamd_test_suite.c b/test/rspamd_test_suite.c
index db12a1a0c..d7b660642 100644
--- a/test/rspamd_test_suite.c
+++ b/test/rspamd_test_suite.c
@@ -31,11 +31,11 @@ main (int argc, char **argv)
rspamd_main = (struct rspamd_main *)g_malloc (sizeof (struct rspamd_main));
memset (rspamd_main, 0, sizeof (struct rspamd_main));
- rspamd_main->server_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL);
+ rspamd_main->server_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
cfg = rspamd_config_new (RSPAMD_CONFIG_INIT_DEFAULT);
cfg->libs_ctx = rspamd_init_libs ();
rspamd_main->cfg = cfg;
- cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL);
+ cfg->cfg_pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), NULL, 0);
cfg->log_type = RSPAMD_LOG_CONSOLE;
cfg->log_level = G_LOG_LEVEL_MESSAGE;