]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
unit test on 64bit systems. (things fell off the hash table, which was too
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Apr 2007 13:12:51 +0000 (13:12 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 3 Apr 2007 13:12:51 +0000 (13:12 +0000)
small).

git-svn-id: file:///svn/unbound/trunk@223 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/unitlruhash.c
testcode/unitslabhash.c

index 4f3cda9dee638917f576e92d80438f19e1eaa87a..8f83206c8178a94cc60e2ada8131e714317f3b3f 100644 (file)
@@ -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);
index 3aa43c405df977dc9e4d1673d949f493450254aa..bd147271090275de7720ea0ad66fb285c78858ff 100644 (file)
@@ -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);