Give a lot more timing latitude to some of the timing tests. Busy buildbots are hitti...
authorHoward Hinnant <hhinnant@apple.com>
Wed, 6 Feb 2013 20:25:56 +0000 (20:25 +0000)
committerHoward Hinnant <hhinnant@apple.com>
Wed, 6 Feb 2013 20:25:56 +0000 (20:25 +0000)
llvm-svn: 174539

libcxx/test/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp
libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp
libcxx/test/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp
libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp
libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp

index 856297d..bc4b7c3 100644 (file)
@@ -61,7 +61,7 @@ void f()
     }
     else
     {
-        assert(t1 - t0 - milliseconds(250) < milliseconds(5));
+        assert(t1 - t0 - milliseconds(250) < milliseconds(50));
         assert(test2 == 0);
     }
     ++runs;
index 137c913..8370c56 100644 (file)
@@ -34,7 +34,7 @@ void f1()
     assert(lk.owns_lock() == true);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 void f2()
@@ -44,7 +44,7 @@ void f2()
     assert(lk.owns_lock() == false);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 int main()
index fa50c7b..c101d89 100644 (file)
@@ -34,7 +34,7 @@ void f()
     time_point t1 = Clock::now();
     assert(lk.owns_lock() == true);
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(2500000));  // within 2.5ms
+    assert(d < ms(25));  // within 25ms
     try
     {
         lk.lock();
index ac70d4a..f19dec2 100644 (file)
@@ -34,7 +34,7 @@ void f1()
     time_point t1 = Clock::now();
     m.unlock();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 void f2()
@@ -43,7 +43,7 @@ void f2()
     assert(m.try_lock_until(Clock::now() + ms(250)) == false);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 int main()
index bfda9ed..e5e9166 100644 (file)
@@ -36,7 +36,7 @@ void f1()
     m.unlock();
     m.unlock();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 void f2()
@@ -45,7 +45,7 @@ void f2()
     assert(m.try_lock_until(Clock::now() + ms(250)) == false);
     time_point t1 = Clock::now();
     ns d = t1 - t0 - ms(250);
-    assert(d < ns(5000000));  // within 5ms
+    assert(d < ms(50));  // within 50ms
 }
 
 int main()