test: Increase time limit for IP creation in an HS test.
commit0545f64d24e04a44fc44e67cd23f631fa5b01135
authorIsis Lovecruft <isis@torproject.org>
Wed, 7 Mar 2018 23:50:00 +0000 (7 23:50 +0000)
committerIsis Lovecruft <isis@torproject.org>
Thu, 8 Mar 2018 20:50:50 +0000 (8 20:50 +0000)
tree1e2a705ae5398e3394045d9f12e2b4ceb7a0cadd
parent0026d1a673e8b01057b0735c977a55995812c85e
test: Increase time limit for IP creation in an HS test.

This should avoid most intermittent test failures on developer and CI machines,
but there could (and probably should) be a more elegant solution.

Also, this test was testing that the IP was created and its expiration time was
set to a time greater than or equal to `now+INTRO_POINT_LIFETIME_MIN_SECONDS+5`:

    /* Time to expire MUST also be in that range. We add 5 seconds because
     * there could be a gap between setting now and the time taken in
     * service_intro_point_new. On ARM, it can be surprisingly slow... */
    tt_u64_op(ip->time_to_expire, OP_GE,
              now + INTRO_POINT_LIFETIME_MIN_SECONDS + 5);

However, this appears to be a typo, since, according to the comment above it,
adding five seconds was done because the IP creation can be slow on some
systems.  But the five seconds is added to the *minimum* time we're comparing
against, and so it actually functions to make this test *more* likely to fail on
slower systems.  (It should either subtract five seconds, or instead add it to
time_to_expire.)

 * FIXES #25450: https://bugs.torproject.org/25450
changes/bug25450 [new file with mode: 0644]
src/test/test_hs_service.c