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

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Dec 8 01:54:01 UTC 2015


#17076: Improve coverage on src/or/config.c (options_validate)
----------------------------------+------------------------------------
 Reporter:  rjunior               |          Owner:
     Type:  enhancement           |         Status:  needs_revision
 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              |
----------------------------------+------------------------------------
Changes (by teor):

 * status:  needs_review => needs_revision


Comment:

 Replying to [comment:10 olabini]:
 > I have now pushed a fix to the branch in question that fixes all memory
 leaks in our tests. There is one exception, where one test triggers
 OpenSSL to cache some ECC information.

 This is probably ok.

 > There is also a small leak in the options_validate test that was there
 before - this has to do with the log capture, that uses a log callback.
 This log callback gets registered with a duplicated string for the
 filename, but I couldn't really figure out the right place to free this.

 Tinytest has a setup/teardown mechanism that could be used to deregister
 the callback and free the string.

 Alternately, it can be deregistered/freed at the end of every test
 function.

 (Or are you having trouble accessing the duplicated string from the tests?
 If it's static, it can be marked STATIC, and placed in the *_PRIVATE
 section of the header.)

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


More information about the tor-bugs mailing list