[tor-bugs] #31516 [Core Tor/Tor]: config refactor: every function table entry should be documented and unit tested (was: config refactor: every function table entry should be unit tested)

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 28 05:53:57 UTC 2019


#31516: config refactor: every function table entry should be documented and unit
tested
-----------------------------------------+---------------------------------
 Reporter:  teor                         |          Owner:  nickm
     Type:  defect                       |         Status:  assigned
 Priority:  Medium                       |      Milestone:  Tor:
                                         |  0.4.2.x-final
Component:  Core Tor/Tor                 |        Version:
 Severity:  Normal                       |     Resolution:
 Keywords:  network-team-roadmap-august  |  Actual Points:
Parent ID:  #29211                       |         Points:
 Reviewer:                               |        Sponsor:  Sponsor31-must
-----------------------------------------+---------------------------------
Description changed by teor:

Old description:

> We've added a lot of function tables, but some of their entries are all
> NULL, everywhere in the code.
>
> So even if it looks like we have 100% coverage, we're not testing these
> code paths.
>
> Ideally, we should have non-trivial functions, which do the thing that
> the function table entry is mean to do.

New description:

 We've added a lot of function tables, but some of their entries are all
 NULL, everywhere in the code.

 So even if it looks like we have 100% coverage, we're not testing these
 code paths.

 Ideally, we should have non-trivial functions, which do the thing that the
 function table entry is mean to do.

 Edited to add:

 Also, function table types should be documented with the same level of
 detail as regular functions. Each argument should have a type, name?, and
 description.

--

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31516#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list