BIND 10 trac2420, updated. 0c36cd61ca034017db27d2f03d7a791c4717813a [2420] added note about current limitation of adding rrset and sig separately.
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Nov 28 22:07:20 UTC 2012
The branch, trac2420 has been updated
via 0c36cd61ca034017db27d2f03d7a791c4717813a (commit)
via 41b26fc471f6e15525a7fe5d522529eea45c73db (commit)
from bb38dbf06510c2a9dfa60b68e56836404d62f694 (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 0c36cd61ca034017db27d2f03d7a791c4717813a
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Nov 28 14:06:36 2012 -0800
[2420] added note about current limitation of adding rrset and sig separately.
commit 41b26fc471f6e15525a7fe5d522529eea45c73db
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Nov 28 13:40:46 2012 -0800
[2420] unify destroying zone data and leak check in the test dtor
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory/zone_data_updater.h | 9 ++++++++-
.../tests/memory/zone_data_updater_unittest.cc | 13 +++++--------
2 files changed, 13 insertions(+), 9 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/zone_data_updater.h b/src/lib/datasrc/memory/zone_data_updater.h
index 43fb1e3..32320ef 100644
--- a/src/lib/datasrc/memory/zone_data_updater.h
+++ b/src/lib/datasrc/memory/zone_data_updater.h
@@ -119,7 +119,8 @@ public:
/// the zone; it's unusual that \c rrset is NULL, but is still possible
/// if these RRsets are given separately to the loader, or if even the
/// zone is half broken and really contains an RRSIG that doesn't have
- /// any covered RRset. This implementation supports these cases.
+ /// any covered RRset. This implementation supports these cases (but
+ /// see the note below).
///
/// There is one tricky case: Due to a limitation of the current
/// implementation, it cannot accept an RRSIG for NSEC3 without the covered
@@ -128,6 +129,12 @@ public:
/// should be very rare in practice, and hopefully wouldn't be a real
/// issue.
///
+ /// \note Due to limitations of the current implementation, if a
+ /// (non RRSIG) RRset and its RRSIG are added separately in different
+ /// calls to this method, the second attempt will be rejected due to
+ /// an \c AddError exception. This will be loosened in Trac
+ /// ticket #2441.
+ ///
/// \throw NullRRset Both \c rrset and sig_rrset is NULL
/// \throw AddError any of a variety of validation checks fail for the
/// \c rrset and its associated \c sig_rrset.
diff --git a/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc b/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
index 3f72fa9..63c69c8 100644
--- a/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
+++ b/src/lib/datasrc/tests/memory/zone_data_updater_unittest.cc
@@ -45,12 +45,16 @@ protected:
zone_data_(ZoneData::create(mem_sgmt_, zname_)),
updater_(new ZoneDataUpdater(mem_sgmt_, zclass_, zname_, *zone_data_))
{}
+
~ZoneDataUpdaterTest() {
- // Make sure zone data is destroyed even if a test results in exception
if (zone_data_ != NULL) {
ZoneData::destroy(mem_sgmt_, zone_data_, zclass_);
}
+ if (!mem_sgmt_.allMemoryDeallocated()) {
+ ADD_FAILURE() << "Memory leak detected";
+ }
}
+
void clearZoneData() {
assert(zone_data_ != NULL);
ZoneData::destroy(mem_sgmt_, zone_data_, zclass_);
@@ -59,13 +63,6 @@ protected:
*zone_data_));
}
- void TearDown() {
- if (zone_data_ != NULL) {
- ZoneData::destroy(mem_sgmt_, zone_data_, zclass_);
- zone_data_ = NULL;
- }
- EXPECT_TRUE(mem_sgmt_.allMemoryDeallocated()); // catch any leak here.
- }
const Name zname_;
const RRClass zclass_;
test::MemorySegmentTest mem_sgmt_;
More information about the bind10-changes
mailing list