]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Commit to help ldns test.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 18 Apr 2007 08:50:44 +0000 (08:50 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 18 Apr 2007 08:50:44 +0000 (08:50 +0000)
git-svn-id: file:///svn/unbound/trunk@248 be551aaa-1e26-0410-a405-d3ace91eadb9

testcode/unitmain.c
testcode/unitmsgparse.c
util/alloc.c

index 26ef8da5e247b3eef4f5864c783eaf0d9e9194f0..7719d875164e37d2f9d55b7bfe2810957fe5bb18 100644 (file)
@@ -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);
index a45534a02a2d1a6715c7c94588de7cf60c543ee2..376ad1fd350c616c8a4ff79f57edb635e24efcd1 100644 (file)
@@ -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++;
        }
index d0085a0cc349802e9d691e312e4b216b6912a3ef..a1231e1a3eeeb52f48195dc1095119dbeed10d55 100644 (file)
@@ -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;
                }