[tor-bugs] #25995 [Core Tor/Tor]: Use a deterministic PRNG in test_circuit_timeout() for predictable coverage.

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue May 1 23:32:32 UTC 2018


#25995: Use a deterministic PRNG in test_circuit_timeout() for predictable
coverage.
-------------------------+-------------------------------------------------
     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:  #25908
       Points:           |   Reviewer:
      Sponsor:           |
-------------------------+-------------------------------------------------
 The test coverage from test_circuit_timeout() is nondeterministic, because
 the function deliberately creates random samples and passes them to the
 circuitstats module.

 I propose that for this function, we replace the RNG with a mocked
 replacement.

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


More information about the tor-bugs mailing list