Author: truckman
Date: Tue Jan 31 05:31:55 2017
New Revision: 1781021
URL: http://svn.apache.org/viewvc?rev=1781021&view=rev
Log:
The clear_001 QA test fails sporadically with a 7 nSec mutex hold time
measurement. The nominal hold time for the mutex is 5 seconds, but
because the mutex state is polled at 1 second intervals, the actual
measured time will probably be 6+ seconds. If the nanoseconds field
of the starting timestamp is large, it is possible that it will have
wrapped to a small value at the poll time when the mutex is detected
as having been released. If the time interval was calculated at
full precision by subtracting both the seconds and nanoseconds fields
of the before and after timestamps, an interval of just over 6
seconds could look like 7 seconds and a large negative number of
nanoseconds. Since this test only subtracts the seconds field, it
can think the difference is 7 seconds and fail the "nSec < 7" assertion.
As a quick fix, change the assertion to "nSec <= 7".
Modified:
openoffice/trunk/main/sal/qa/osl/mutex/osl_Mutex.cxx
Modified: openoffice/trunk/main/sal/qa/osl/mutex/osl_Mutex.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/sal/qa/osl/mutex/osl_Mutex.cxx?rev=1781021&r1=1781020&r2=1781021&view=diff
==============================================================================
--- openoffice/trunk/main/sal/qa/osl/mutex/osl_Mutex.cxx (original)
+++ openoffice/trunk/main/sal/qa/osl/mutex/osl_Mutex.cxx Tue Jan 31 05:31:55
2017
@@ -729,7 +729,7 @@ namespace osl_ClearableGuard
myThread.join();
- ASSERT_TRUE(nSec < 7 && nSec > 1) << "ClearableGuard method:
clear";
+ ASSERT_TRUE(nSec <= 7 && nSec > 1) << "ClearableGuard method:
clear";
}
TEST_F(clear, clear_002 )