[tor-bugs] #23077 [Core Tor/Tor]: Channelpadding tests rely on actual time; can fail

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Aug 1 15:16:35 UTC 2017


#23077: Channelpadding tests rely on actual time; can fail
------------------------------+--------------------------------------
     Reporter:  nickm         |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.1.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  unittest, channelpadding
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------------
 We're seeing an intermittent failure on Jenkins:

 {{{
 14:46:53 channelpadding/channelpadding_consensus: [forking]
 14:46:53   FAIL ../tor/src/test/test_channelpadding.c:445: assert(decision
 OP_EQ CHANNELPADDING_PADDING_SCHEDULED): 4 vs 2
 14:46:53   [channelpadding_consensus FAILED]
 }}}

 Looking at the code, it seems that the underlying channelpadding code
 depends on the actual time (from `monotime_coarse_abosolute_*()`) to make
 its decisions.  But we aren't doing anything to mock those functions from
 inside the test case, which may be making the outcome of this test
 dependent on the code running fast enough.

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


More information about the tor-bugs mailing list