BIND 10 #1954: Implement perfdhcp command parser
BIND 10 Development
do-not-reply at isc.org
Fri May 25 13:19:04 UTC 2012
#1954: Implement perfdhcp command parser
-------------------------------------+-------------------------------------
Reporter: | Owner: marcin
stephen | Status: reviewing
Type: | Milestone: Sprint-
enhancement | DHCP-20120528
Priority: | Resolution:
medium | Sensitive: 0
Component: | Sub-Project: DHCP
perfdhcp | Estimated Difficulty: 16
Keywords: | Total Hours: 42
Defect Severity: N/A |
Feature Depending on Ticket: |
Add Hours to Ticket: 6 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by marcin):
Most of the suggestions implemented and pushed with commit number:
3f32b68d6f2d0f02af6cebac046a604751ad4dcc
Q: ''initRandomRange(): "errmsg" does not need to be "std::string" - it
could be declared as "const char*" (which avoids the need to call c_str()
before using it).''
A: It could be, but I want to be consistent with other functions where I
declare string arguments as const std::string&
Q: ''initRandomRange(): why is "randomRange" (which should be random_range
- see note on variable names) declared as "long long"? The "opt" argument
is cast to "long long", then that value is cast to uint32_t. Why not cast
to uint32_t directly?''
A: I want to verify that random range is not negative. If I cast to
uint32_t I loose information that user specified negative value and I
approve it. Lexical_cast does not throw exception if I cast negative value
(string) to unsigned. Or it does?
Q: ''IpVersion: need a test that an exception is thrown if both -4 and -6
are given together.''
A: There is such a test in TEST_F(CommandOptionsTest, IpVersion)
Q: ''IpVersion: the comment "negative test cases" - these checks are
checking that invalid combinations of flags are caught.''
A: By negative test cases I exactly mean ''invalid combinations of flags
are caught''. Isn't it what negative tests are about?
Q: ''RandomRange: according to usage(), the "-R" switch specifies the
number of different clients. It does not indicate that anything is random.
Is the use of the word "random" justified?''
A: Random range value is a range of values that we use to replace last
four octets of default DUID value in outgoing packages to simulate
different clients. Eventually, different clients have different random
values so this value maps to number of clients. In order to avoid
confusion I renamed some getter methods, members etc to reflect that it is
number of clients. In the future maybe we could change this in
documentation too?
Q: ''Base: need to check invalid values passed as arguments to "mac=" and
"duid=" are caught.''
A: There are test cases like this in TEST_F(CommandOptionsTest, Base)
Q: ''DropTime: question: reading usage() suggests that DropTime should be
a double value. Yet DropTime is stored as as array of two doubles: why?''
A: Comments in the code updated
--
Ticket URL: <http://bind10.isc.org/ticket/1954#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list