BIND 10 trac2430, updated. 2fb705ea4e81f57170a9335a1d524946f6eef829 [2430] Do case-specific tests using TXT RR type

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Feb 4 13:40:48 UTC 2014


The branch, trac2430 has been updated
       via  2fb705ea4e81f57170a9335a1d524946f6eef829 (commit)
       via  06cd899614951d962cf1454d2deeff5b31ad38c7 (commit)
      from  ada4354704ee0e4c0b088d57b4a04c219d7e8031 (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 2fb705ea4e81f57170a9335a1d524946f6eef829
Author: Mukund Sivaraman <muks at isc.org>
Date:   Tue Feb 4 19:07:43 2014 +0530

    [2430] Do case-specific tests using TXT RR type
    
    (The implementation being tested did not need any changes.)

commit 06cd899614951d962cf1454d2deeff5b31ad38c7
Author: Mukund Sivaraman <muks at isc.org>
Date:   Tue Feb 4 18:52:59 2014 +0530

    [2430] Rollback case change
    
    These were not the correct tests to be modified. The correct tests to be
    modified do not use any hex alphabets currently, and the alphabets are
    also generated in the LHS names which are case-insensitive during
    comparison.
    
    This will be properly fixed in the next commits on the branch.

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

Summary of changes:
 src/lib/dns/tests/master_loader_unittest.cc |   40 +++++++++++++++++++--------
 1 file changed, 28 insertions(+), 12 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/master_loader_unittest.cc b/src/lib/dns/tests/master_loader_unittest.cc
index 50fb94a..09ee3d0 100644
--- a/src/lib/dns/tests/master_loader_unittest.cc
+++ b/src/lib/dns/tests/master_loader_unittest.cc
@@ -506,25 +506,38 @@ TEST_F(MasterLoaderTest, generateWithModifiers) {
     const string input =
         "$ORIGIN example.org.\n"
         "$TTL 3600\n"
+
+        // Use a positive delta of 1 in the LHS and a negative delta of
+        // -1 in the RHS
         "$GENERATE 2-9/2 host${1} A 192.0.2.${-1}\n"
+
         "$GENERATE 10-12 host${0,4} A 192.0.2.$\n"
         "$GENERATE 14-15 host${0,4,d} A 192.0.2.$\n"
-        "$GENERATE 30-31 host${0,4,x} A 192.0.2.$\n"
+
         // Names are case-insensitive, so we use TXT's RDATA to check
-        // case.
+        // case with hex representation.
+        "$GENERATE 30-31 host$ TXT \"Value ${0,4,x}\"\n"
         "$GENERATE 42-43 host$ TXT \"Value ${0,4,X}\"\n"
+
+        // Octal does not use any alphabets
         "$GENERATE 45-46 host${0,4,o} A 192.0.2.$\n"
+
         // Here, the LHS has a trailing dot (which would result in an
         // out-of-zone name), but that should be handled as a relative
         // name.
         "$GENERATE 90-92 ${0,8,n} A 192.0.2.$\n"
+
         // Here, the LHS has no trailing dot, and results in the same
         // number of labels as width=8 above.
         "$GENERATE 94-96 ${0,7,n} A 192.0.2.$\n"
-        // Uppercase nibble
-        "$GENERATE 98-98 ${0,10,N} A 192.0.2.$\n"
+
+        // Names are case-insensitive, so we use TXT's RDATA to check
+        // case with nibble representation.
+        "$GENERATE 106-107 host$ TXT \"Value ${0,9,n}\"\n"
+        "$GENERATE 109-110 host$ TXT \"Value ${0,9,N}\"\n"
+
         // Junk type will not parse and 'd' is assumed.
-        "$GENERATE 100-101 host${0,4,j} A 192.0.2.$\n";
+        "$GENERATE 200-201 host${0,4,j} A 192.0.2.$\n";
     stringstream ss(input);
     setLoader(ss, Name("example.org."), RRClass::IN(),
               MasterLoader::MANY_ERRORS);
@@ -545,8 +558,8 @@ TEST_F(MasterLoaderTest, generateWithModifiers) {
     checkRR("host0014.example.org", RRType::A(), "192.0.2.14");
     checkRR("host0015.example.org", RRType::A(), "192.0.2.15");
 
-    checkRR("host001e.example.org", RRType::A(), "192.0.2.30");
-    checkRR("host001f.example.org", RRType::A(), "192.0.2.31");
+    checkRR("host30.example.org", RRType::TXT(), "Value 001e");
+    checkRR("host31.example.org", RRType::TXT(), "Value 001f");
 
     checkRR("host42.example.org", RRType::TXT(), "Value 002A");
     checkRR("host43.example.org", RRType::TXT(), "Value 002B");
@@ -558,14 +571,17 @@ TEST_F(MasterLoaderTest, generateWithModifiers) {
     checkRR("b.5.0.0.example.org", RRType::A(), "192.0.2.91");
     checkRR("c.5.0.0.example.org", RRType::A(), "192.0.2.92");
 
-    checkRR("E.5.0.0.example.org", RRType::A(), "192.0.2.94");
-    checkRR("F.5.0.0.example.org", RRType::A(), "192.0.2.95");
+    checkRR("e.5.0.0.example.org", RRType::A(), "192.0.2.94");
+    checkRR("f.5.0.0.example.org", RRType::A(), "192.0.2.95");
     checkRR("0.6.0.0.example.org", RRType::A(), "192.0.2.96");
 
-    checkRR("2.6.0.0.0.example.org", RRType::A(), "192.0.2.98");
+    checkRR("host106.example.org", RRType::TXT(), "Value a.6.0.0.0");
+    checkRR("host107.example.org", RRType::TXT(), "Value b.6.0.0.0");
+    checkRR("host109.example.org", RRType::TXT(), "Value D.6.0.0.0");
+    checkRR("host110.example.org", RRType::TXT(), "Value E.6.0.0.0");
 
-    checkRR("host0100.example.org", RRType::A(), "192.0.2.100");
-    checkRR("host0101.example.org", RRType::A(), "192.0.2.101");
+    checkRR("host0200.example.org", RRType::A(), "192.0.2.200");
+    checkRR("host0201.example.org", RRType::A(), "192.0.2.201");
 }
 
 TEST_F(MasterLoaderTest, generateWithNoModifiers) {



More information about the bind10-changes mailing list