[tor-bugs] #25994 [Core Tor/Tor]: test_channel: keep time constant when running channel/outbound_cell

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue May 1 22:38:15 UTC 2018


#25994: test_channel: keep time constant when running channel/outbound_cell
-------------------------+-------------------------------------------------
     Reporter:  nickm    |      Owner:  nickm
         Type:  defect   |     Status:  assigned
     Priority:  Medium   |  Milestone:  Tor: 0.3.4.x-final
    Component:  Core     |    Version:
  Tor/Tor                |   Keywords:  tor-ci, tor-tests-coverage, tor-
     Severity:  Normal   |  tests-unit
Actual Points:           |  Parent ID:  #25993
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 With fairly low probability, the outbound_cell test could get run with
 cached_gettimeofday on a different 10-second boundary than the current
 value of gettimeofday, resulting in a call to scale_active_circuits().

 Now that we no longer use cached_gettimeofday, the probability of calling
 scale_active_circuits is even lower here.  If the test takes about 200
 microseconds (as it does on my desktop), we should only expect it to
 straddle the 10-second boundary with P < 200 usec / 10s == 1 / 50000.

 Still, it's a good idea to fix this kind of thing.

 This change will _lower_ coverage from the maximum by making it so this
 test does not call scale_active_circuits.  However, this test does not
 actually validate any of the behavior of scale_active_circuits, so this
 change is appropriate.

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


More information about the tor-bugs mailing list