[tor-bugs] #14478 [Tor]: Zero length keys test improvements

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Feb 2 17:44:17 UTC 2015


#14478: Zero length keys test improvements
-----------------------------+--------------------------------
     Reporter:  cypherpunks  |      Owner:
         Type:  enhancement  |     Status:  needs_revision
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:  Tor: unspecified
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------
Changes (by nickm):

 * status:  needs_review => needs_revision


Comment:

 Replying to [comment:3 cypherpunks]:
 > Replying to [comment:1 nickm]:
 > > 2 and 3 seem like a good idea.
 > >
 > > I like the idea behind 1, but I'm worried about the "rm -rf".  Call me
 paranoid, but "rm -rf" is just *asking* for trouble.  Can we define a
 function to get called when the script exits, and rm the specific files
 instead?  If not we should at least make sure that the filename returned
 by mktemp is nonempty and more or less as expected, I think.
 >
 > While writing the function i ran into more possible improvements. First,
 the negative exit values seem to produce errors because negative values
 are an !''illegal number!''. Can someone verify this?
 > {{{
 > some at other:shell$ sh
 > $ exit -1
 > sh: 1: exit: Illegal number: -1
 > $
 > }}}
 > ''Note that after the error, the shell (`sh`) does not actually exit.''

 This behavior seems shell-dependent.  Better not use -1 here.

 > Second, parameter expansion uses quotes to ensure it is properly
 expanded. By using `${}` the quotes become unnecessary and can be
 !''saved!'' for quoting the entire string (which should be always be done,
 not just in cases with spaces, for consistency) without the need for two
 double quotes.

 Seems fine to me.

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


More information about the tor-bugs mailing list