]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4273. [bug] Only call dns_test_begin() and dns_test_end() once each
authorMark Andrews <marka@isc.org>
Mon, 7 Dec 2015 06:52:37 +0000 (17:52 +1100)
committerMark Andrews <marka@isc.org>
Mon, 7 Dec 2015 06:52:37 +0000 (17:52 +1100)
                        in nsec3_test as it fails with GOST if called multiple
                        times.

CHANGES
lib/dns/tests/nsec3_test.c

diff --git a/CHANGES b/CHANGES
index 06cb373c731d5e603ed4b57b73853cb29d548390..d6909749d7fa3a0b335c32a16076903c2ad20618 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+4273.  [bug]           Only call dns_test_begin() and dns_test_end() once each
+                       in nsec3_test as it fails with GOST if called multiple
+                       times. 
+
 4272.  [bug]           dig: the +norrcomments option didn't work with +multi.
                        [RT #41234]
 
index dec0dc2e54da3b656b76a21ec35a7393431a202c..1f68d9109fbe83a5400cce09087d685a4fb604b9 100644 (file)
@@ -40,20 +40,15 @@ iteration_test(const char* file, unsigned int expected) {
        dns_db_t *db = NULL;
        unsigned int iterations;
 
-       result = dns_test_begin(NULL, ISC_FALSE);
-       ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
        result = dns_test_loaddb(&db, dns_dbtype_zone, "test", file);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
        result = dns_nsec3_maxiterations(db, NULL, mctx, &iterations);
        ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
 
-       ATF_REQUIRE_EQ(iterations, expected);
+       ATF_CHECK_EQ(iterations, expected);
 
        dns_db_detach(&db);
-
-       dns_test_end();
 }
 
 /*
@@ -66,14 +61,20 @@ ATF_TC_HEAD(max_iterations, tc) {
                          " is returned for different key size mixes");
 }
 ATF_TC_BODY(max_iterations, tc) {
+       isc_result_t result;
 
        UNUSED(tc);
 
+       result = dns_test_begin(NULL, ISC_FALSE);
+       ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
        iteration_test("testdata/nsec3/1024.db", 150);
        iteration_test("testdata/nsec3/2048.db", 500);
        iteration_test("testdata/nsec3/4096.db", 2500);
        iteration_test("testdata/nsec3/min-1024.db", 150);
        iteration_test("testdata/nsec3/min-2048.db", 500);
+
+       dns_test_end();
 }
 #else
 ATF_TC(untested);