BIND 10 #2679: use value-param tests for database tests, not type-param tests
BIND 10 Development
do-not-reply at isc.org
Wed Feb 13 18:20:02 UTC 2013
#2679: use value-param tests for database tests, not type-param tests
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: defect | jinmei
Priority: medium | Status:
Component: data source | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130219
Sub-Project: DNS | Resolution:
Estimated Difficulty: 5 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:10 vorner]:
> The `enableNSEC3Generic` function. I mean this code:
> {{{#!c++
> // Add NSEC3s
> for (int i = 0; TEST_NSEC3_RECORDS[i][0] != NULL; ++i) {
> const string
nsec3_columns[DatabaseAccessor::ADD_NSEC3_COLUMN_COUNT] =
> {
> Name(TEST_NSEC3_RECORDS[i][0]).split(0, 1).toText(true),
> TEST_NSEC3_RECORDS[i][2], // TTL
> TEST_NSEC3_RECORDS[i][1], // RR type
> TEST_NSEC3_RECORDS[i][4] // RDATA
> };
> accessor.addNSEC3RecordToZone(nsec3_columns);
> }
> }}}
>
> Specially, the line:
> {{{#!c++
> Name(TEST_NSEC3_RECORDS[i][0]).split(0, 1).toText(true),
> }}}
>
> It seems to expect the string is actually a full name, not just the
first label (or I don't understand the purpose of the split there).
Ah, okay, good catch. Although it's not a fault of this branch but
an existing oddity, that conversion wasn't necessary. I guess it was
a result of naive incorporation from the main database.cc
implementation (but it's been working for either case by luck). I
just simplified it.
--
Ticket URL: <http://bind10.isc.org/ticket/2679#comment:11>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list