[tor-bugs] #17076 [Tor]: Improve coverage on src/or/config.c (options_validate)

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 29 16:43:07 UTC 2016


#17076: Improve coverage on src/or/config.c (options_validate)
----------------------------------+------------------------------------
 Reporter:  rjunior               |          Owner:
     Type:  enhancement           |         Status:  reopened
 Priority:  Medium                |      Milestone:  Tor: 0.2.8.x-final
Component:  Tor                   |        Version:
 Severity:  Normal                |     Resolution:
 Keywords:  testing, 028-triaged  |  Actual Points:
Parent ID:                        |         Points:  small
  Sponsor:  SponsorS              |
----------------------------------+------------------------------------

Comment (by olabini):

 When it comes to this:
    never rely on the developer to choose a set of default options that
 validate correctly
       instead, supply a set of default options that validate correctly at
 the top of the file, and use them throughout the file, overriding
 individual options as needed

 I'm not sure I understand exactly what you mean. The problem is that the
 current setup is tuned to reach as many branches as possible.

 The real solution here is actually to separate out options_validate into
 smaller functions that can be tested in isolation, instead of testing the
 full options_validate - the goal of testing all branches in that function
 was as a step to make it possible to refactor the function into something
 more manageable.

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


More information about the tor-bugs mailing list