BIND 10 trac2480-2, updated. aa32f38e127d1b3b3d4e1349fbfdcac155dc5c5e [2480] add note about restriction on querytest's addRRsets for in-memory.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jan 3 18:09:40 UTC 2013
The branch, trac2480-2 has been updated
via aa32f38e127d1b3b3d4e1349fbfdcac155dc5c5e (commit)
via 40502d5e2c6cbe71143e842ac7908e8a55b62324 (commit)
from 82041829bd8cc7400d0fee9d08e4cf1091c25a70 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit aa32f38e127d1b3b3d4e1349fbfdcac155dc5c5e
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Jan 3 10:09:19 2013 -0800
[2480] add note about restriction on querytest's addRRsets for in-memory.
also, assumption failure is checked explicitly.
commit 40502d5e2c6cbe71143e842ac7908e8a55b62324
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Jan 3 09:59:54 2013 -0800
[2480] updated description of gen-query-testdata to match the latest behavior.
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/tests/gen-query-testdata.py | 4 ++--
src/bin/auth/tests/query_unittest.cc | 12 +++++++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/gen-query-testdata.py b/src/bin/auth/tests/gen-query-testdata.py
index 8e2da65..a71deb0 100755
--- a/src/bin/auth/tests/gen-query-testdata.py
+++ b/src/bin/auth/tests/gen-query-testdata.py
@@ -15,8 +15,8 @@
# PERFORMANCE OF THIS SOFTWARE.
"""\
-This is a supplemental script to generate various forms of test data
-from a unified source file.
+This is a supplemental script to auto generate test data in the form of
+C++ source code from a DNS zone file.
Usage: python gen-query-testdata.py source_file output-cc-file
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index ed61611..685b0a8 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -835,7 +835,8 @@ protected:
getCommonRRSIGText("A")),
base_zone_file(TEST_OWN_DATA_BUILDDIR "/example-base.zone"),
nsec3_zone_file(TEST_OWN_DATA_BUILDDIR "/example-nsec3.zone"),
- common_zone_file(TEST_OWN_DATA_BUILDDIR "/example-common-inc.zone")
+ common_zone_file(TEST_OWN_DATA_BUILDDIR "/example-common-inc.zone"),
+ rrsets_added_(false)
{
// Set up the faked hash calculator.
setNSEC3HashCreator(&nsec3hash_creator_);
@@ -899,6 +900,11 @@ protected:
// A helper to add some RRsets to the test zone in the middle of a test
// case. The detailed behavior is quite different depending on the
// data source type, and not all parameters are used in all cases.
+ //
+ // Note: due to limitation of its implementation, this method doesn't
+ // work correctly for in-memory if called more than once. This condition
+ // is explicitly checked so any accidental violation would be noted as a
+ // test failure.
void addRRsets(const vector<string>& rrsets_to_add, ClientList& list,
const string& zone_file)
{
@@ -916,6 +922,9 @@ protected:
}
break;
case INMEMORY:
+ ASSERT_FALSE(rrsets_added_);
+ rrsets_added_ = true;
+
// dump the RRsets to be added to the placeholder of commonly
// included zone file (removing any existing contents) and do
// full reconfiguration.
@@ -989,6 +998,7 @@ private:
const string nsec3_zone_file;
const string common_zone_file;
const TestNSEC3HashCreator nsec3hash_creator_;
+ bool rrsets_added_;
};
// We test the in-memory and SQLite3 data source implementations. SQLite3
More information about the bind10-changes
mailing list