BIND 10 #2956: DHCP-DDNS: Create server controller class

BIND 10 Development do-not-reply at isc.org
Wed Jun 5 14:33:31 UTC 2013


#2956: DHCP-DDNS: Create server controller class
-------------------------------------+-------------------------------------
            Reporter:  stephen       |                        Owner:  tmark
                Type:  enhancement   |                       Status:
            Priority:  medium        |  reviewing
           Component:  dhcp          |                    Milestone:
            Keywords:                |  Sprint-DHCP-20130606
           Sensitive:  0             |                   Resolution:
         Sub-Project:  DHCP          |                 CVSS Scoring:
Estimated Difficulty:  0             |              Defect Severity:  N/A
         Total Hours:  0             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by stephen):

 * owner:  stephen => tmark


Comment:

 Second and final part of the review of commit
 b222f7faadc7ed7898a936a2b97b2a385c6a2a1b

 '''src/bin/d2/tests/d2_controller_unittests.cc'''[[BR]]
 commandLineArgs test: use "const_cast<char*> instead of "(char*)" when
 setting up argv.

 commandLineArgs test:: for flexibility, initialise argc to
 (sizeof(argv)/sizeof(char*))

 (The two comments above also apply to the launchNormalShutdown test.)



 '''src/bin/d2/tests/d2_process_unittests.cc'''[[BR]]
 construction test: Should be no spaces between "THROW" and "(".



 '''src/bin/d2/tests/d_controller_unittests.cc'''[[BR]]
 See comments for d2_controller_unittests regarding setting up command-line
 arguments.

 commandLineArgs test: should be a space around the "=" sign when setting
 xopt. (Incidentally, that variable is probably better set via a memcpy.)




 '''src/bin/d2/tests/d_test_stubs.{cc,h}'''[[BR]]
 DStubProcess::stub_proc_command_ (and other static strings): unless there
 is a real need for this to be declared a string, it should be a "const
 char*" to avoid a potential "static initialisation fiasco".
 Alternatively, put the string as a static member inside a global "get"
 method - it won't be initialised until the method is called, and that will
 occur only after all other global variables have been initialised.

 Should probably include "d2_log.h" in the .cc file.  d2_logger is
 explicitly referenced and, at the moment, the code relies on its
 definition being included in files that are themselves included.

 DStrubController::customOption(): use "static_cast<char>" instead of
 "(char)"

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


More information about the bind10-tickets mailing list