diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-07 11:09:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-07 11:09:23 -0500 |
commit | 78cb55e42fd5188733f714f8db518ecc02f7f380 (patch) | |
tree | 0fb65a4c22428de8ae1e993476f21c93b3139bb7 | |
parent | 9b37d540b05bf25de5ef82766d0228aee7979af0 (diff) | |
parent | fce425e3ff0281de29f04ac46d8c395befee607d (diff) | |
download | tor-78cb55e42fd5188733f714f8db518ecc02f7f380.tar.gz tor-78cb55e42fd5188733f714f8db518ecc02f7f380.zip |
Merge branch 'maint-0.2.9' into release-0.2.9
-rw-r--r-- | changes/19974 | 5 | ||||
-rw-r--r-- | src/test/test_util.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/changes/19974 b/changes/19974 new file mode 100644 index 0000000000..5496143ddf --- /dev/null +++ b/changes/19974 @@ -0,0 +1,5 @@ + o Minor bugfixes (unit tests): + - Fix tolerances in unit tests for monotonic time comparisons between + nanoseconds and microseconds. Previously, we accepted a 10 us + difference only, which is not realistic on every platform's + clock_gettime(). Fixes bug 19974; bugfix on 0.2.9.1-alpha. diff --git a/src/test/test_util.c b/src/test/test_util.c index 7276c0cbfc..fcda564569 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5531,9 +5531,9 @@ test_util_monotonic_time(void *arg) 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 +10); + 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 + 10); + tt_u64_op(usecc1, OP_LE, nsecc1 / 1000 + 1000); done: ; |