[tor-bugs] #25450 [Core Tor/Tor]: Intermittent test failures for hs_service/service_intro_point

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 7 23:47:30 UTC 2018


#25450: Intermittent test failures for hs_service/service_intro_point
------------------------------+--------------------------------
     Reporter:  isis          |      Owner:  isis
         Type:  defect        |     Status:  assigned
     Priority:  Very High     |  Milestone:  Tor: 0.3.3.x-final
    Component:  Core Tor/Tor  |    Version:  Tor: 0.3.1.3-alpha
     Severity:  Minor         |   Keywords:  tor-unittests
Actual Points:                |  Parent ID:
       Points:  .5            |   Reviewer:
      Sponsor:  Sponsor8-can  |
------------------------------+--------------------------------
 weasel and teor both noted this. I've also experienced this test failing
 about 1 out of 30 or so times on my development laptop.

 {{{
 10:32               weasel+ | 10:28:33 hs_service/service_intro_point:
 [forking]
 10:32               weasel+ | 10:28:33   FAIL
 ../src/test/test_hs_service.c:420: assert(ip->time_to_expire OP_GE now +
 INTRO_POINT_LIFETIME_MIN_SECONDS + 5): 1520483305 vs 1520483309
 10:32               weasel+ | 10:28:33   [service_intro_point FAILED]
 10:32               weasel+ | https://jenkins.torproject.org/job/tor-
 debian-0.3.2-nightly-binaries/ARCHITECTURE=i386,SUITE=buster/179/console
 10:32               weasel+ | maybe I'm imagining or misattributing
 things, but hasn't this test ALWAYS been buggy?
 10:33                teor4  | I remember it being an issue before.
 Probably one for asn or dgoulet
 }}}

 It's because there is a hardcoded `time_t` that uses the real system time
 and then later the test expects an HS intro point to have been established
 within 5 seconds of real clock time.

 I'm going to do the stupid fix of increasing it to 500 seconds. Possibly
 in the future there should be a more elaborate solution involving mocking
 the `time()` function by passing in a function pointer to its
 implementation into the functions being tested?

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


More information about the tor-bugs mailing list