Opened 5 years ago

Last modified 12 months ago

#8954 new defect

Need a better convention for testing option variable names

Reported by: nickm Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-relay, testing, clarity, usability
Cc: karsten Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (8)

comment:1 Changed 5 years ago by nickm

Component: - Select a componentTor

comment:2 Changed 5 years ago by karsten

Cc: karsten added

comment:3 Changed 4 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.???

comment:4 Changed 19 months ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:5 Changed 18 months ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:6 Changed 12 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:7 Changed 12 months ago by nickm

Keywords: usability added
Severity: Normal

comment:8 Changed 12 months ago by nickm

#11967 was a duplicate of this.

Note: See TracTickets for help on using tickets.