]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Bump the test util/threads timeout up to 150 sec
authorNick Mathewson <nickm@torproject.org>
Mon, 25 Jun 2012 17:44:34 +0000 (13:44 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 25 Jun 2012 17:44:34 +0000 (13:44 -0400)
This should make some debian build systems happier.

Also, increase the select() timeout to a more reasonable 100 msec.

changes/bug6227 [new file with mode: 0644]
src/test/test_util.c

diff --git a/changes/bug6227 b/changes/bug6227
new file mode 100644 (file)
index 0000000..77b06ac
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (unit tests):
+    - Avoid a false positive in the util/threads unit test by increasing
+      the maximum timeout time. Fixes bug 6227; bugfix on 0.2.0.4-alpha.
index fab95953bd8574bcf4570a010e08700622642e3c..9b9fccfb7d9821fc378c304e8bb8b3d7bc3a7cc4 100644 (file)
@@ -1186,7 +1186,7 @@ test_util_threads(void)
 #ifndef _WIN32
   struct timeval tv;
   tv.tv_sec=0;
-  tv.tv_usec=10;
+  tv.tv_usec=100*1000;
 #endif
 #ifndef TOR_IS_MULTITHREADED
   /* Skip this test if we aren't threading. We should be threading most
@@ -1213,7 +1213,7 @@ test_util_threads(void)
     if (strmap_get(_thread_test_strmap, "thread 1") &&
         strmap_get(_thread_test_strmap, "thread 2")) {
       done = 1;
-    } else if (time(NULL) > started + 25) {
+    } else if (time(NULL) > started + 150) {
       timedout = done = 1;
     }
     tor_mutex_release(_thread_test_mutex);