BIND 10 trac2377, updated. 2580bf5a49c4d26ccb3077226ef4897138f044c3 [2377] Use rrsetCheck() for comparing RRsets
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Dec 7 14:07:41 UTC 2012
The branch, trac2377 has been updated
via 2580bf5a49c4d26ccb3077226ef4897138f044c3 (commit)
via 22d72fe82da9313ecd73bae3efa61788f0b8c7dd (commit)
from f2a0e7ce76ed227a7067919a1f44cb33ccf1e826 (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 2580bf5a49c4d26ccb3077226ef4897138f044c3
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Fri Dec 7 15:02:18 2012 +0100
[2377] Use rrsetCheck() for comparing RRsets
Comparing their toText() might be unreliable. In theory, the toText()
result could be slightly different even for equal RRsets (if their
background implementation is different) and the test fail.
Include a hack for the rrsetCheck interface being incompatible.
commit 22d72fe82da9313ecd73bae3efa61788f0b8c7dd
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Fri Dec 7 14:59:48 2012 +0100
[2377] Fix BasicRRset::getRRsig() documentation
It claimed it throws every time and returns NULL at the same time. It is
impossible and the first one is not true.
-----------------------------------------------------------------------
Summary of changes:
.../datasrc/tests/master_loader_callbacks_test.cc | 16 ++++++++++++++++
src/lib/dns/rrset.h | 3 ---
2 files changed, 16 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/tests/master_loader_callbacks_test.cc b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
index f555961..48469e3 100644
--- a/src/lib/datasrc/tests/master_loader_callbacks_test.cc
+++ b/src/lib/datasrc/tests/master_loader_callbacks_test.cc
@@ -20,6 +20,8 @@
#include <dns/rrttl.h>
#include <dns/rdata.h>
+#include <testutils/dnsmessage_test.h>
+
#include <exceptions/exceptions.h>
#include <gtest/gtest.h>
@@ -42,6 +44,20 @@ public:
virtual void addRRset(const isc::dns::AbstractRRset& rrset) {
ASSERT_FALSE(expected_rrsets_.empty());
+ // As the rrsetCheck requires a shared pointer, we need to create
+ // a copy.
+ isc::dns::RRsetPtr copy(new isc::dns::BasicRRset(rrset.getName(),
+ rrset.getClass(),
+ rrset.getType(),
+ rrset.getTTL()));
+ EXPECT_FALSE(rrset.getRRsig()) << "Unexpected RRSIG on rrset, not "
+ "copying. Following check will likely fail as a result.";
+ for (isc::dns::RdataIteratorPtr it(rrset.getRdataIterator());
+ !it->isLast(); it->next()) {
+ copy->addRdata(it->getCurrent());
+ }
+
+ isc::testutils::rrsetCheck(expected_rrsets_.front(), copy);
EXPECT_EQ(expected_rrsets_.front().get()->toText(), rrset.toText());
// And remove this RRset, as it has been used.
expected_rrsets_.pop_front();
diff --git a/src/lib/dns/rrset.h b/src/lib/dns/rrset.h
index 9c1715b..395cbdd 100644
--- a/src/lib/dns/rrset.h
+++ b/src/lib/dns/rrset.h
@@ -770,9 +770,6 @@ public:
//@{
/// \brief Return pointer to this RRset's RRSIG RRset
///
- /// \exception NotImplemented Always thrown. Associated RRSIG RRsets are
- /// not supported in this class.
- ///
/// \return Null pointer, as this class does not support RRSIG records.
virtual RRsetPtr getRRsig() const {
return (RRsetPtr());
More information about the bind10-changes
mailing list