BIND 10 #2442: update TXTLikeImpl with from lexer constructor

BIND 10 Development do-not-reply at isc.org
Wed Dec 5 12:36:55 UTC 2012


#2442: update TXTLikeImpl with from lexer constructor
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  jinmei
            Priority:  medium        |                       Status:
           Component:  libdns++      |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20121218
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => jinmei


Comment:

 Hello

 I noticed the system tests (the old ones) fail reliably for me. Could you
 have a look?
 {{{
 $ make systest
 cd tests/system; \
 sh /home/vorner/work/bind10/tests/system/runall.sh
 S:bindctl:Wed Dec  5 13:30:48 CET 2012
 T:bindctl:1:A
 A:System test bindctl
 I:starting server nsx1
 I:Checking b10-auth is disabled by default (0)
 I:Starting b10-auth and checking that it works (1)
 I:Checking BIND 10 statistics after a pause (2)
 I:Stopping b10-auth and checking that (3)
 I:Restarting b10-auth and checking that (4)
 I:Rechecking BIND 10 statistics after a pause (5)
 I:Changing the data source from sqlite3 to in-memory (6)
 I:Rechecking BIND 10 statistics after changing the datasource (7)
 I:Starting more b10-auths and checking that (8)
 I:Rechecking BIND 10 statistics consistency after a pause (9)
 I:Stopping extra b10-auths and checking that (10)
 I:exit status: 0
 R:PASS
 E:bindctl:Wed Dec  5 13:31:30 CET 2012
 S:glue:Wed Dec  5 13:31:30 CET 2012
 T:glue:1:A
 A:System test glue
 I:starting server nsx1
 I:testing that a TLD referral gets a full glue set from the root zone (0)
 I:testing that we don't find out-of-zone glue (1)
 I:exit status: 0
 R:PASS
 E:glue:Wed Dec  5 13:31:35 CET 2012
 S:ixfr/in-2:Wed Dec  5 13:31:35 CET 2012
 T:ixfr/in-2:1:A
 A:System test ixfr/in-2
 I:starting server ns1
 I:starting server nsx2
 I:ns1 updating IXFR-server to suitable start version
 I:ns1 IXFR server loading
 /home/vorner/work/bind10/tests/system/ixfr/db.example.n4
 I:ns1 server reload successful
 I:ns1 waiting for SOA serial to change from 94
 I:ns1 SOA serial was at 94, now at 96
 I:nsx2 SOA serial of IXFR client is 94
 I:ns1 updating IXFR-server for ixfr-in tests
 I:ns1 IXFR server loading
 /home/vorner/work/bind10/tests/system/ixfr/db.example.n2
 I:ns1 server reload successful
 I:ns1 waiting for SOA serial to change from 96
 I:ns1 SOA serial was at 96, now at 98
 I:ns1 IXFR server loading
 /home/vorner/work/bind10/tests/system/ixfr/db.example.n0
 I:ns1 server reload successful
 I:ns1 waiting for SOA serial to change from 98
 I:ns1 SOA serial was at 98, now at 100
 I:nsx2 forcing IXFR client to retrieve new version of the zone
 "zone xfrin is started"

 Exit from bindctl
 I:nsx2 waiting for SOA serial to change from 94
 I:nsx2 SOA serial was at 94, now at 100
 I:client and server zones identical
 I:exit status: 0
 R:PASS
 E:ixfr/in-2:Wed Dec  5 13:32:07 CET 2012
 }}}

 Also, there are some minor points to the code.

 In the `decimalToNumber` function, wouldn't it be easier to construct a
 std::string in-place with begin and end iterator form instead of the
 several lines of memcpy juggling?

 I believe the reported message should have the `-1` adjustment here too:
 {{{#!c++
     if (result.size() > MAX_CHARSTRING_LEN + 1) { // '+ 1' due to the len
 field
         isc_throw(CharStringTooLong, "character-string is too long: " <<
                   result.size() << " bytes");
     }
 }}}

 Is it obvious why this works? Or is it guaranteed from the string
 implementation?
 {{{
 region.beg = &str[0];       // note this works even if str is empty ‒ hmm,
 what does it guarantee?
 }}}

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


More information about the bind10-tickets mailing list