From: Wouter Wijngaards Date: Wed, 18 Apr 2007 08:50:44 +0000 (+0000) Subject: Commit to help ldns test. X-Git-Tag: release-0.3~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ef0188400751bf360f543969a03c1d1bb1d80c6;p=thirdparty%2Funbound.git Commit to help ldns test. git-svn-id: file:///svn/unbound/trunk@248 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/testcode/unitmain.c b/testcode/unitmain.c index 26ef8da5e..7719d8751 100644 --- a/testcode/unitmain.c +++ b/testcode/unitmain.c @@ -211,11 +211,13 @@ main(int argc, char* argv[]) } printf("Start of %s unit test.\n", PACKAGE_STRING); checklock_start(); + /* net_test(); alloc_test(); msgreply_test(); lruhash_test(); slabhash_test(); + */ msgparse_test(); checklock_stop(); printf("%d tests succeeded\n", testcount); diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c index a45534a02..376ad1fd3 100644 --- a/testcode/unitmsgparse.c +++ b/testcode/unitmsgparse.c @@ -298,7 +298,10 @@ testfromfile(ldns_buffer* pkt, struct alloc_cache* alloc, ldns_buffer* out, continue; if(strlen(buf) < 10) /* skip pcat line numbers. */ continue; - if(0) printf("test no %d\n", no); + if(0) { + printf("test no %d: %s", no, buf); + fflush(stdout); + } testpkt(pkt, alloc, out, buf); no++; } diff --git a/util/alloc.c b/util/alloc.c index d0085a0cc..a1231e1a3 100644 --- a/util/alloc.c +++ b/util/alloc.c @@ -117,6 +117,8 @@ alloc_clear(struct alloc_cache* alloc) p = alloc->quar; while(p) { np = alloc_special_next(p); + /* deinit special type */ + lock_rw_destroy(&p->entry.lock); free(p); p = np; }