diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-12 11:56:42 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-09-12 11:56:42 +0100 |
commit | 491e42b434921ed3d102956bb7ad1fe3697fef46 (patch) | |
tree | 45986c3764c82d50f4fded5e7c05a25c875adfa9 /test/rspamd_statfile_test.c | |
parent | ad29a3dd73648b23f818d7a62c6424a14a884e10 (diff) | |
download | rspamd-491e42b434921ed3d102956bb7ad1fe3697fef46.tar.gz rspamd-491e42b434921ed3d102956bb7ad1fe3697fef46.zip |
Restore testing framework.
Diffstat (limited to 'test/rspamd_statfile_test.c')
-rw-r--r-- | test/rspamd_statfile_test.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/rspamd_statfile_test.c b/test/rspamd_statfile_test.c index 870a827fa..753782c9c 100644 --- a/test/rspamd_statfile_test.c +++ b/test/rspamd_statfile_test.c @@ -1,7 +1,8 @@ -#include "../src/config.h" -#include "../src/main.h" -#include "../src/statfile.h" +#include "config.h" +#include "main.h" +#include "statfile.h" #include "tests.h" +#include "ottery.h" #define TEST_FILENAME "/tmp/rspamd_test.stat" #define HASHES_NUM 256 @@ -13,17 +14,14 @@ rspamd_statfile_test_func () rspamd_mempool_t *p; stat_file_t *st; uint32_t random_hashes[HASHES_NUM], i, v; - time_t now; + time_t now = time (NULL); p = rspamd_mempool_new (rspamd_mempool_suggest_size ()); umask (S_IWGRP | S_IWOTH); - pool = statfile_pool_new (p, 10 * 1024 * 1024, TRUE); + pool = statfile_pool_new (p, TRUE); - now = time (NULL); - /* Fill random array */ - srand (now); for (i = 0; i < HASHES_NUM; i ++) { - random_hashes[i] = rand (); + random_hashes[i] = ottery_rand_uint32 (); } /* Create new file */ |