#27810 closed defect (fixed)

hs_service/helper_functions test seems unreliable on slow systems

Reported by: nickm Owned by: dgoulet
Priority: Very High Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-test, tor-hs, 035-must
Cc: catalyst Actual Points:
Parent ID: Points:
Reviewer: mikeperry Sponsor:

Description (last modified by nickm)

Hi! I've seen this test failure a few times on Travis:

hs_service/helper_functions: [forking] 
  FAIL src/test/test_hs_service.c:837: assert(ip->time_to_expire OP_GE now + INTRO_POINT_LIFETIME_MIN_SECONDS): 1537602275 vs 1537602297
  [helper_functions FAILED]

It seems to happen intermittently, so I think it might be one of those things where a slow-running machine fails the test because of the unexpected passage of time.

Is it possible to mock time here?

Child Tickets

Change History (11)

comment:1 Changed 23 months ago by nickm

Description: modified (diff)

comment:2 Changed 23 months ago by dgoulet

Keywords: tor-test tor-hs added
Owner: set to dgoulet
Status: newaccepted

To fix this, we would need to MOCK approx_time() since the time_to_expire of the IP is set as follow:

    ip->time_to_expire = approx_time() +

comment:3 Changed 23 months ago by dgoulet

Status: acceptedneeds_review

Branch: ticket27810_035_01

I've looked at the other checks of time_to_expire and I believe they are all OK.

comment:4 Changed 23 months ago by dgoulet

Reviewer: mikeperry

comment:5 Changed 23 months ago by nickm

Keywords: 035-must added

Add the 035-must tag to some assertion failures, hangs, ci-blockers, etc.

comment:6 Changed 23 months ago by nickm

Priority: MediumVery High

Mark all 035-must tickets as "very high"

comment:7 Changed 22 months ago by catalyst

Cc: catalyst added

comment:9 Changed 22 months ago by mikeperry

Tests pass; lgtm!

comment:10 Changed 22 months ago by mikeperry

Status: needs_reviewmerge_ready

comment:11 Changed 22 months ago by nickm

Milestone: Tor: 0.3.5.x-finalTor: 0.3.4.x-final
Resolution: fixed
Status: merge_readyclosed

cherry-picked to 0.3.4 and merged forward.

Note: See TracTickets for help on using tickets.