aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-03-19 05:36:06 -0400
committerNick Mathewson <nickm@torproject.org>2018-03-19 05:36:06 -0400
commitbcea98a4b41f7e54068ad73f50eb5e0ceb593a12 (patch)
treeb7633360d1c860ef2c935ee68bdb049fc122c9c3 /src/test
parent4e5e973421ce17c1b4466722390f0e47bdeaa527 (diff)
parent296e429ebcb676b39a574bf8e8850c53bb659d74 (diff)
downloadtor-bcea98a4b41f7e54068ad73f50eb5e0ceb593a12.tar.gz
tor-bcea98a4b41f7e54068ad73f50eb5e0ceb593a12.zip
Merge branch 'maint-0.3.3'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_hs_service.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index 7fade6379d..11d96820ac 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -413,13 +413,14 @@ test_service_intro_point(void *arg)
INTRO_POINT_MIN_LIFETIME_INTRODUCTIONS);
tt_u64_op(ip->introduce2_max, OP_LE,
INTRO_POINT_MAX_LIFETIME_INTRODUCTIONS);
- /* 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... */
+ /* Time to expire MUST also be in that range. We subtract 500 seconds
+ * because there could be a gap between setting now and the time taken in
+ * service_intro_point_new. On ARM and other older CPUs, it can be
+ * surprisingly slow... */
tt_u64_op(ip->time_to_expire, OP_GE,
- now + INTRO_POINT_LIFETIME_MIN_SECONDS + 5);
+ now + INTRO_POINT_LIFETIME_MIN_SECONDS - 500);
tt_u64_op(ip->time_to_expire, OP_LE,
- now + INTRO_POINT_LIFETIME_MAX_SECONDS + 5);
+ now + INTRO_POINT_LIFETIME_MAX_SECONDS - 500);
tt_assert(ip->replay_cache);
tt_assert(ip->base.link_specifiers);
/* By default, this is NOT a legacy object. */