BIND 10 trac526, updated. af4b23610ff5cb55748737dff2b67c4f905b2480 [trac526] added tests for explicit type CNAME queries. added notes about points to be considered with chaining.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jan 27 18:34:52 UTC 2011


The branch, trac526 has been updated
       via  af4b23610ff5cb55748737dff2b67c4f905b2480 (commit)
      from  661ee8d341d0a24b6cab13302b028a9efb40daa4 (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 af4b23610ff5cb55748737dff2b67c4f905b2480
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jan 27 10:34:05 2011 -0800

    [trac526] added tests for explicit type CNAME queries.  added notes about
    points to be considered with chaining.

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

Summary of changes:
 src/bin/auth/tests/query_unittest.cc |   45 ++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 86c9ab6..9727571 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -420,8 +420,21 @@ TEST_F(QueryTest, CNAME) {
         cname_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_F(QueryTest, explicitCNAME) {
+    // same owner name as the CNAME test but explicitly query for CNAME RR.
+    // expect the same response as we don't provide a full chain yet.
+    Query(memory_datasrc, Name("cname.example.com"), RRType::CNAME(),
+        response).process();
+
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 1, 3, 3,
+        cname_txt, zone_ns_txt, ns_addrs_txt);
+}
+
 TEST_F(QueryTest, CNAME_NX_RRSET) {
     // Leads to www.example.com, it doesn't have TXT
+    // note: with chaining, what should be expected is not trivial:
+    // BIND 9 returns the CNAME in answer and SOA in authority, no additional.
+    // NSD returns the CNAME, NS in authority, A/AAAA for NS in additional.
     Query(memory_datasrc, Name("cname.example.com"), RRType::TXT(),
         response).process();
 
@@ -429,8 +442,22 @@ TEST_F(QueryTest, CNAME_NX_RRSET) {
         cname_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_F(QueryTest, explicitCNAME_NX_RRSET) {
+    // same owner name as the NXRRSET test but explicitly query for CNAME RR.
+    Query(memory_datasrc, Name("cname.example.com"), RRType::CNAME(),
+        response).process();
+
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 1, 3, 3,
+        cname_txt, zone_ns_txt, ns_addrs_txt);
+}
+
 TEST_F(QueryTest, CNAME_NX_DOMAIN) {
     // Leads to nxdomain.example.com
+    // note: with chaining, what should be expected is not trivial:
+    // BIND 9 returns the CNAME in answer and SOA in authority, no additional,
+    // RCODE being NXDOMAIN.
+    // NSD returns the CNAME, NS in authority, A/AAAA for NS in additional,
+    // RCODE being NOERROR.
     Query(memory_datasrc, Name("cnamenxdom.example.com"), RRType::A(),
         response).process();
 
@@ -438,6 +465,15 @@ TEST_F(QueryTest, CNAME_NX_DOMAIN) {
         cname_nxdom_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_F(QueryTest, explicitCNAME_NX_DOMAIN) {
+    // same owner name as the NXDOMAIN test but explicitly query for CNAME RR.
+    Query(memory_datasrc, Name("cnamenxdom.example.com"), RRType::CNAME(),
+        response).process();
+
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 1, 3, 3,
+        cname_nxdom_txt, zone_ns_txt, ns_addrs_txt);
+}
+
 TEST_F(QueryTest, CNAME_OUT) {
     /*
      * This leads out of zone. This should have only the CNAME even
@@ -454,4 +490,13 @@ TEST_F(QueryTest, CNAME_OUT) {
         cname_out_txt, zone_ns_txt, ns_addrs_txt);
 }
 
+TEST_F(QueryTest, explicitCNAME_OUT) {
+    // same owner name as the OUT test but explicitly query for CNAME RR.
+    Query(memory_datasrc, Name("cnameout.example.com"), RRType::CNAME(),
+        response).process();
+
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 1, 3, 3,
+        cname_out_txt, zone_ns_txt, ns_addrs_txt);
+}
+
 }




More information about the bind10-changes mailing list