BIND 10 #2467: Remove raw pointers from DHCP test code

BIND 10 Development do-not-reply at isc.org
Wed Apr 24 13:54:18 UTC 2013


#2467: Remove raw pointers from DHCP test code
-------------------------------------+-------------------------------------
            Reporter:  stephen       |                        Owner:
                Type:  defect        |  stephen
            Priority:  low           |                       Status:
           Component:  dhcp          |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-DHCP-20130509
         Sub-Project:  DHCP          |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  Low
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by tomek):

 * owner:  tomek => stephen


Comment:

 Reviewing changes made on af37bfe0c400e0dd923f57e9775d67a8f17af802.

 Do we want to document methods and classes in test code? Most methods from
 config_parser_unitest.cc are documented, but all class members are not.
 You modified srv_. Would it be possible to document it (and the other two
 members as well)?

 '''dhcp4_srv_unittest.cc'''
 boost::shared_ptr<Pkt4> is used throughout the code. It should be
 substituted with Pkt4Ptr. As this is strictly not within the scope of this
 ticket, I'm ok if you choose to not do it. But then please create a
 separate ticket for it.


 '''dhcp6_srv_unittest.cc'''
 boost::shared_ptr<Pkt6> may be replaced with Pkt6Ptr.

 '''iface_mgr_unittest.cc'''
 There's a (disabled) dhcp6Sniffer pseudo-test. It is not really a test,
 but a piece of code I used for generating test code based on actual
 received packets. We should probably extract it into separate file and
 keep as test writing assistance tool.

 In any case, this code uses raw pointers. It should not do that.

 Please submit a ticket for IfaceMgr::getIface() update. It should not
 return raw pointer, but shared_ptr instead.

 '''option4_addrlst_unittest.cc'''
 I'm somewhat familiar with the concept of a complex time, but we do not
 yet support it. Please remove ''i'' from copyright year. :)

 '''option_unittest.cc'''
 Comment for v4_basic test is not valid anymore. v4 is now implemented.

 '''pkt4_unittest.cc'''
 There are several multiplications in Pkt4Test.options that do not have
 spaces around the * and + operators.

 Thank you for doing this work. It must have been less than exciting.

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


More information about the bind10-tickets mailing list