]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix flapping of test_service_intro_point() unittest.
authorGeorge Kadianakis <desnacked@riseup.net>
Tue, 8 Oct 2019 15:59:27 +0000 (18:59 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Tue, 8 Oct 2019 16:00:43 +0000 (19:00 +0300)
changes/bug31995 [new file with mode: 0644]
src/test/test_hs_service.c

diff --git a/changes/bug31995 b/changes/bug31995
new file mode 100644 (file)
index 0000000..c7ddd43
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (testing):
+    - Avoid intermittent test failures due to a test that had relied on
+      inconsistent timing sources. Fixes bug 31995; bugfix on 0.3.1.3-alpha.
index c5854f0ff8cff7eea7034dfa961cff0a1592cbbd..8993ce3fe22e493f2b5dc4a084fd6c146ecfd2fa 100644 (file)
@@ -674,9 +674,11 @@ test_service_intro_point(void *arg)
 
   (void) arg;
 
+  update_approx_time(1481621834);
+
   /* Test simple creation of an object. */
   {
-    time_t now = time(NULL);
+    time_t now = approx_time();
     ip = helper_create_service_ip();
     tt_assert(ip);
     /* Make sure the authentication keypair is not zeroes. */