BIND 10 trac2108_3, updated. 105b19f75e8d0158a1370faae8ac4dd99ed0752c [2108] Add test for multiple RRSIGs for a single covered RRset

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 6 04:35:34 UTC 2012


The branch, trac2108_3 has been updated
       via  105b19f75e8d0158a1370faae8ac4dd99ed0752c (commit)
       via  37ef5a70b967ee810f9082bfa596f0f806ca4fd0 (commit)
       via  723fcfb3c12c9cb0abd5d5354fb083f6d1aaa853 (commit)
      from  365c64286ae8724ed8af98af64228db8e605b30d (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 105b19f75e8d0158a1370faae8ac4dd99ed0752c
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Sep 6 10:05:05 2012 +0530

    [2108] Add test for multiple RRSIGs for a single covered RRset

commit 37ef5a70b967ee810f9082bfa596f0f806ca4fd0
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Sep 6 10:04:12 2012 +0530

    [2108] Fix covered type in exception message

commit 723fcfb3c12c9cb0abd5d5354fb083f6d1aaa853
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Sep 6 09:56:46 2012 +0530

    [2108] Test when RRSIG doesn't match the type it is supposed to cover

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/memory/memory_client.cc            |    2 +-
 .../datasrc/memory/tests/memory_client_unittest.cc |   15 ++++++++++++++-
 src/lib/datasrc/memory/tests/testdata/Makefile.am  |    2 ++
 ....zone => example.org-rrsig-type-unmatched.zone} |    3 ++-
 ...ollows-nothing.zone => example.org-rrsigs.zone} |    4 +++-
 5 files changed, 22 insertions(+), 4 deletions(-)
 copy src/lib/datasrc/memory/tests/testdata/{example.org-rrsig-follows-nothing.zone => example.org-rrsig-type-unmatched.zone} (78%)
 copy src/lib/datasrc/memory/tests/testdata/{example.org-rrsig-follows-nothing.zone => example.org-rrsigs.zone} (60%)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/memory_client.cc b/src/lib/datasrc/memory/memory_client.cc
index 1a04036..f85aafb 100644
--- a/src/lib/datasrc/memory/memory_client.cc
+++ b/src/lib/datasrc/memory/memory_client.cc
@@ -372,7 +372,7 @@ public:
                           "RRSIG is being added, "
                           "but doesn't match the last RR's type: "
                           << last_rrset_->getType() << " vs. "
-                          << rrsig->getType());
+                          << covered);
             }
         }
 
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index 0b40624..2625ef8 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -144,6 +144,19 @@ TEST_F(MemoryClientTest, loadRRSIGNameUnmatched) {
     // Teardown checks for memory segment leaks
 }
 
+TEST_F(MemoryClientTest, loadRRSIGTypeUnmatched) {
+    EXPECT_THROW(client_->load(Name("example.org"),
+                               TEST_DATA_DIR
+                               "/example.org-rrsig-type-unmatched.zone"),
+                 InMemoryClient::AddError);
+    // Teardown checks for memory segment leaks
+}
+
+TEST_F(MemoryClientTest, loadRRSIGs) {
+    client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-rrsigs.zone");
+    EXPECT_EQ(1, client_->getZoneCount());
+}
+
 TEST_F(MemoryClientTest, getZoneCount) {
     EXPECT_EQ(0, client_->getZoneCount());
     client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-empty.zone");
@@ -237,5 +250,5 @@ TEST_F(MemoryClientTest, getJournalReaderNotImplemented) {
 
 // TODO:
 // Add test for add() with separate_rrs=true
-
+// Add test for ZoneIterator variant of load()
 }
diff --git a/src/lib/datasrc/memory/tests/testdata/Makefile.am b/src/lib/datasrc/memory/tests/testdata/Makefile.am
index 04f25bf..2a551e8 100644
--- a/src/lib/datasrc/memory/tests/testdata/Makefile.am
+++ b/src/lib/datasrc/memory/tests/testdata/Makefile.am
@@ -6,3 +6,5 @@ EXTRA_DIST += example.org-broken1.zone
 EXTRA_DIST += example.org-broken2.zone
 EXTRA_DIST += example.org-rrsig-follows-nothing.zone
 EXTRA_DIST += example.org-rrsig-name-unmatched.zone
+EXTRA_DIST += example.org-rrsig-type-unmatched.zone
+EXTRA_DIST += example.org-rrsigs.zone
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-rrsig-type-unmatched.zone b/src/lib/datasrc/memory/tests/testdata/example.org-rrsig-type-unmatched.zone
new file mode 100644
index 0000000..300e124
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-rrsig-type-unmatched.zone
@@ -0,0 +1,6 @@
+;; test zone file used for ZoneFinderContext tests.
+;; RRSIGs are (obviouslly) faked ones for testing.
+
+example.org. 3600 IN SOA	ns1.example.org. bugs.x.w.example.org. 72 3600 300 3600000 3600
+ns1.example.org.		      3600 IN AAAA	2001:db8::1
+ns1.example.org.		      3600 IN RRSIG	A 7 3 3600 20150420235959 20051021000000 40430 example.org. FAKEFAKE
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone b/src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone
new file mode 100644
index 0000000..594b453
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-rrsigs.zone
@@ -0,0 +1,7 @@
+;; test zone file used for ZoneFinderContext tests.
+;; RRSIGs are (obviouslly) faked ones for testing.
+
+example.org. 3600 IN SOA	ns1.example.org. bugs.x.w.example.org. 74 3600 300 3600000 3600
+ns1.example.org.		      3600 IN A	 	192.168.0.1
+ns1.example.org.		      3600 IN RRSIG	A 7 3 3600 20150420235959 20051021000000 40430 example.org. FAKEFAKE
+ns1.example.org.		      3600 IN RRSIG	A 7 2 3600 20150420235959 20051021000000 40430 example.org. FAKEFAKE



More information about the bind10-changes mailing list