BIND 10 #2223: Update tests for code disabled in rrsetsCheck()

BIND 10 Development do-not-reply at isc.org
Wed Oct 10 22:43:41 UTC 2012


#2223: Update tests for code disabled in rrsetsCheck()
-------------------------------------+-------------------------------------
                   Reporter:  muks   |                 Owner:  UnAssigned
                       Type:         |                Status:  reviewing
  defect                             |             Milestone:
                   Priority:         |  Sprint-20121023
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  4
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:5 jelte]:
 > Ready for review

 Hmm, maybe I misunderstand something, but doesn't this version do
 something redundant?  In the first `for` loop it actually compares the
 content of the two sets of RRsets:

 {{{#!cpp
         if (found_rrset_it != expected_end) {
             rrsetCheck(*found_rrset_it, *it);
             ++rrset_matched;
             rrset_matched += (*it)->getRRsigDataCount();
         }
 }}}

 (although it doesn't handle "embedded" RRSIGs in the actual sets).
 The latter half of the original version just check if there's any
 missing or redundant RRset by checking the redundant.

 So, except for the RRSIGs handling it already does what the string
 comparison does.

 Also, comparing toText() results is less reliable because it doesn't
 take into account case-insensitive RDATA fields.  That's why
 `rrsetCheck()` uses `Rdata::compare()`.

 If my understanding so far is correct, I guess what should be done is
 to "flatten" the "actual" sets, extracting RRSIGs from RRsets between
 actual_begin and actual_end and reconstruct actual_begin and
 actual_end (it would be okay to just naively build a fresh
 `vector<ConstRRset>` and use its bein() and end()) before the first
 `for` loop.  I guess you don't have to touch the expected sets since
 they should be already flattened as commented in the original version.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2223#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list