[tor-bugs] #8954 [- Select a component]: Need a better convention for testing option variable names

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri May 24 14:57:13 UTC 2013


#8954: Need a better convention for testing option variable names
---------------------------------------+------------------------------------
 Reporter:  nickm                      |          Owner:                    
     Type:  defect                     |         Status:  new               
 Priority:  minor                      |      Milestone:  Tor: 0.2.5.x-final
Component:  - Select a component       |        Version:                    
 Keywords:  tor-relay testing clarity  |         Parent:                    
   Points:                             |   Actualpoints:                    
---------------------------------------+------------------------------------
 In #6752, I noticed a troublesome point about some of our Testing*
 options.  The convention is that these options can only take a non-default
 value when TestingTorNetwork is set.  So we might have something like:
 {{{
    TestingBeVerySecure 0
 }}}
 to mean that we should turn off the security feature "BeVerySecure", and
 that this is an option you can only set when TestingTorNetwork is enabled.

 But the trouble happens when you go to read the code and you see something
 like
 {{{
    if (options->TestingBeVerySecure) {
      ....
    }
 }}}
 which gives the impression that the block will only be executed when some
 kind of Testing feature is enabled, which is not the case.

 I think we need a better convention here.

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


More information about the tor-bugs mailing list