diff --git a/testcode/unitlruhash.c b/testcode/unitlruhash.c index 532e912e8..699ef72e4 100644 --- a/testcode/unitlruhash.c +++ b/testcode/unitlruhash.c @@ -245,7 +245,7 @@ test_short_table(struct lruhash* table) } /** number of hash test max */ -#define HASHTESTMAX 100 +#define HASHTESTMAX 32 /** test adding a random element */ static void @@ -495,14 +495,14 @@ void lruhash_test() /* also small in size so that reclaim has to be done quickly. */ struct lruhash* table ; printf("lruhash test\n"); - table = lruhash_create(1024, 16384, + table = lruhash_create(2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_bin_find_entry(table); test_lru(table); test_short_table(table); test_long_table(table); lruhash_delete(table); - table = lruhash_create(1024, 16384, + table = lruhash_create(2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); lruhash_delete(table); diff --git a/testcode/unitslabhash.c b/testcode/unitslabhash.c index bd1472710..b3a0d7285 100644 --- a/testcode/unitslabhash.c +++ b/testcode/unitslabhash.c @@ -122,7 +122,7 @@ test_short_table(struct slabhash* table) } /** number of hash test max */ -#define HASHTESTMAX 100 +#define HASHTESTMAX 32 /** test adding a random element */ static void @@ -377,12 +377,12 @@ void slabhash_test() /* also small in size so that reclaim has to be done quickly. */ struct slabhash* table; printf("slabhash test\n"); - table = slabhash_create(4, 2, 16384, + table = slabhash_create(4, 2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_short_table(table); test_long_table(table); slabhash_delete(table); - table = slabhash_create(4, 2, 16384, + table = slabhash_create(4, 2, 4096, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); slabhash_delete(table);