From: Wouter Wijngaards Date: Tue, 3 Apr 2007 13:12:51 +0000 (+0000) Subject: unit test on 64bit systems. (things fell off the hash table, which was too X-Git-Tag: release-0.2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b5c6410626929032a80b5e351ac8df24c33dac;p=thirdparty%2Funbound.git unit test on 64bit systems. (things fell off the hash table, which was too small). git-svn-id: file:///svn/unbound/trunk@223 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/testcode/unitlruhash.c b/testcode/unitlruhash.c index 4f3cda9de..8f83206c8 100644 --- a/testcode/unitlruhash.c +++ b/testcode/unitlruhash.c @@ -381,6 +381,8 @@ test_long_table(struct lruhash* table) size_t i; memset(ref, 0, sizeof(ref)); /* test assumption */ + if(0) log_info(" size %d x %d < %d", (int)test_sizefunc(NULL, NULL), + (int)HASHTESTMAX, (int)table->space_max); unit_assert( test_sizefunc(NULL, NULL)*HASHTESTMAX < table->space_max); if(0) lruhash_status(table, "unit test", 1); srandom(48); @@ -493,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(2, 4096, + table = lruhash_create(2, 16384, 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(2, 4096, + table = lruhash_create(2, 16384, 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 3aa43c405..bd1472710 100644 --- a/testcode/unitslabhash.c +++ b/testcode/unitslabhash.c @@ -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, 4096, + table = slabhash_create(4, 2, 16384, 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, 4096, + table = slabhash_create(4, 2, 16384, test_sizefunc, test_compfunc, test_delkey, test_deldata, NULL); test_threaded_table(table); slabhash_delete(table);