aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2019-03-01 14:14:51 +1000
committerteor <teor@torproject.org>2019-03-01 14:14:51 +1000
commitc1ab53847907166cdc93727cee5877c68e8bdd01 (patch)
treee308894515c17ef3b203d5aa18eee087f89e4f61
parentecbc2e80a0fec4f9cd6a8c1e2dd1bebc3899567a (diff)
parentfe3dfe7e38b4ad0c11ff05b7dbd0a9b1d7efc4a8 (diff)
downloadtor-c1ab53847907166cdc93727cee5877c68e8bdd01.tar.gz
tor-c1ab53847907166cdc93727cee5877c68e8bdd01.zip
Merge remote-tracking branch 'tor-github/pr/748' into maint-0.2.9
-rw-r--r--changes/bug251135
-rw-r--r--src/test/test_util.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/changes/bug25113 b/changes/bug25113
new file mode 100644
index 0000000000..4a020b784d
--- /dev/null
+++ 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
index 0b707caeeb..dd122b250d 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -5541,10 +5541,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);
done:
;