Opened 8 years ago

Closed 8 years ago

#1971 closed defect (fixed)

untested cases in RBtree previousNode

Reported by: jinmei Owned by: muks
Priority: medium Milestone: Sprint-20120529
Component: data source Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

As I commented in #1803, there seem to be some untested cases:
http://bind10.isc.org/ticket/1803#comment:6

I've copied a lcov result at:
http://bind10.isc.org/~jinmei/datasrc-lcov/datasrc/rbtree.h.gcov.html

Please make sure these are covered. While I don't think this is a
blocking issue that requires reverting the feature, I'd like to make
100% sure all parts are definitely covered by tests because this is
important and complicated code.

I'm pushing this to the current sprint as a remaining task of #1803.

Subtickets

Change History (11)

comment:1 Changed 8 years ago by muks

  • Owner set to muks
  • Status changed from new to assigned

Picking

comment:2 Changed 8 years ago by muks

  • Owner changed from muks to UnAssigned
  • Status changed from assigned to reviewing

Up for review.

I haven't actually run these through lcov again as it seems to take 2000 years to complete a lcov run on my box (I have not managed to complete one). But the testcases themselves are for the cases that lcov reports. These are documented in the test code and commit logs too.

comment:3 Changed 8 years ago by muks

  • Owner changed from UnAssigned to muks

Taking back to check a case.

comment:4 Changed 8 years ago by muks

  • Owner changed from muks to UnAssigned

Up for review.

comment:5 Changed 8 years ago by muks

Whoever reviews this ticket has to run lcov and check that the lines reported as uncovered (in the bug description) are properly covered now.

comment:6 Changed 8 years ago by vorner

  • Owner changed from UnAssigned to vorner

comment:7 Changed 8 years ago by vorner

  • Owner changed from vorner to muks

The code looks like it should be testing what was missing. However, I can't run lcov either. It doesn't loop, but the tests segfault form me (it is several tests, including the one in datasrc). I'm trying to get someone to run it on the jabber room now, but we may want to have some more look into lcov, as it seems many of the developers can't make it work.

comment:8 follow-up: Changed 8 years ago by muks

  • Owner changed from muks to jinmei

jinmei: Can you run lcov on this branch and see if it's properly covered now? We are not able to run it ourselves.

comment:9 in reply to: ↑ 8 Changed 8 years ago by jinmei

Replying to muks:

jinmei: Can you run lcov on this branch and see if it's properly covered now? We are not able to run it ourselves.

Done.
http://bind10.isc.org/~jinmei/datasrc-lcov2/datasrc/rbtree.h.gcov.html

Not examining the test code at all, but the lcov result looks okay.

comment:10 Changed 8 years ago by jinmei

  • Owner changed from jinmei to muks

comment:11 Changed 8 years ago by muks

  • Resolution set to fixed
  • Status changed from reviewing to closed

Pushed to master:

* c7a5a56 [1971] Fix broken tree structure that didn't match the one in the figure
* 39b658e [1971] Update test rbtree (of rbtrees) to suit our right-child testcase
* e401615 [master] Remove duplicate data
* 94a2da0 [1971] Add another testcase for untested code detected by lcov
* 3692c48 [1971] Test the node_path.isEmpty() check
* 74ac6ab [master] Update .gitignore

Resolving as fixed. Thank you for the reviews and lcov runs.

Note: See TracTickets for help on using tickets.