tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 78382d557ab3da0b11f4fbda829f463067fc808f
parent 86498e5aa59a74babd9454c336681a48019f479b
Author: Nick Mathewson <nickm@torproject.org>
Date:   Wed,  7 Feb 2018 11:33:14 -0500

Merge remote-tracking branch 'dgoulet/bug25113_029_01'

Diffstat:
Achanges/bug25113 | 5+++++
Msrc/test/test_util.c | 8++++----
2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/changes/bug25113 b/changes/bug25113 @@ -0,0 +1,5 @@ + o Minor bugfixes (unit test, monotonic time): + - Bump a gap of 1msec to 10msec used in the monotonic time test that makes + sure the nsec/usec/msec time read are synchronized. This change was + needed to accommodate slow system like armel or when the clock_gettime() + is not a VDSO on the running kernel. Fixes bug 25113; bugfix on 0.2.9.1. diff --git a/src/test/test_util.c b/src/test/test_util.c @@ -5838,10 +5838,10 @@ test_util_monotonic_time(void *arg) tt_u64_op(usec1, OP_GE, nsec1 / 1000); tt_u64_op(msecc1, OP_GE, nsecc1 / 1000000); tt_u64_op(usecc1, OP_GE, nsecc1 / 1000); - tt_u64_op(msec1, OP_LE, nsec1 / 1000000 + 1); - tt_u64_op(usec1, OP_LE, nsec1 / 1000 + 1000); - tt_u64_op(msecc1, OP_LE, nsecc1 / 1000000 + 1); - tt_u64_op(usecc1, OP_LE, nsecc1 / 1000 + 1000); + tt_u64_op(msec1, OP_LE, nsec1 / 1000000 + 10); + tt_u64_op(usec1, OP_LE, nsec1 / 1000 + 10000); + tt_u64_op(msecc1, OP_LE, nsecc1 / 1000000 + 10); + tt_u64_op(usecc1, OP_LE, nsecc1 / 1000 + 10000); uint64_t coarse_stamp_diff = monotime_coarse_stamp_units_to_approx_msec(stamp2-stamp1);