Skip to content

Commit

Permalink
Starting filter manager tests
Browse files Browse the repository at this point in the history
  • Loading branch information
armon committed Feb 28, 2012
1 parent 8f1e5c9 commit 28f58d8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/bloomd/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ int main(void)
TCase *tc1 = tcase_create("config");
TCase *tc2 = tcase_create("hashmap");
TCase *tc3 = tcase_create("filter");
TCase *tc4 = tcase_create("filter manager");
SRunner *sr = srunner_create(s1);
int nf;

Expand Down Expand Up @@ -57,7 +58,7 @@ int main(void)

// Add the filter tests
suite_add_tcase(s1, tc3);
tcase_set_timeout(tc3, 5);
tcase_set_timeout(tc3, 3);
tcase_add_test(tc3, test_filter_init_destroy);
tcase_add_test(tc3, test_filter_init_discover_destroy);
tcase_add_test(tc3, test_filter_init_discover_delete);
Expand All @@ -71,6 +72,11 @@ int main(void)
tcase_add_test(tc3, test_filter_page_out);
tcase_add_test(tc3, test_filter_bounded_fp);

// Add the filter tests
suite_add_tcase(s1, tc4);
tcase_set_timeout(tc4, 3);
tcase_add_test(tc4, NULL);

srunner_run_all(sr, CK_ENV);
nf = srunner_ntests_failed(sr);
srunner_free(sr);
Expand Down
14 changes: 14 additions & 0 deletions tests/bloomd/test_filtmgr.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <check.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
#include "config.h"
#include "filter.h"
#include "filter_manager.h"


0 comments on commit 28f58d8

Please sign in to comment.