|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2349 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2349.
Report 2349 Actions
Problem Report Number 2349 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.1215 Raised 2004-03-25 03:45 Updated 2004-03-26 14:33 Published 2004-03-26 14:33 Product Standard Internationalised System Calls and Libraries Extended V3 (UNIX 03) Certification Program The Open Brand certification program Test Suite VSRT version 5.2.5 Test Identification rt.os/timers/timer_settime test 9 Specification Base Definitions Issue 6 Location in Spec none Problem Summary Test works incorrectly if the timer resulution is not a even multiple of
1 secondProblem Text The code for test 9 looks like this
if (res.tv_nsec == 999999999) {
tp2.it_interval.tv_sec = 1;
tp2.it_interval.tv_nsec = 0;
expect.it_interval.tv_sec=1;
expect.it_interval.tv_sec=999999998;
} else {
tp2.it_interval.tv_sec = 0;
tp2.it_interval.tv_nsec = res.tv_nsec+1;
if (res.tv_nsec > 499999999) {
expect.it_interval.tv_sec=1;
expect.it_interval.tv_nsec=(2*res.tv_nsec)-1000000000;
} else {
expect.it_interval.tv_sec=0;
expect.it_interval.tv_nsec=res.tv_nsec*2;
}
}
It looks like the test is expecting the resolution to be 1000
nanoseconds. But this isn't the case, it can vary depending on the HW
the OS is running on. In the case illustrated in the output the
resolution is 818 nanoseconds. timer_settime() attempts to set
999998457, so the base multiple is int(999998457/818) = 1222492 * 818 =
999998456. The next consecutive integer multiple is 999998456 + 818 =
999999274, which is the value returned by our timer_settime(). Also note
the negative expected value for nanoseconds.Test Output
************************************************************************
/tset/rt.os/timers/timer_settime/T.timer_settime 9 Failed
Test Description:
If _POSIX_TIMERS is defined or the implementation supports the
timer_settime() function as described in XSH5 and XSH6:
A call to timer_settime() shall round up time values that are
between two consecutive non-negative integer multiples of the
resolution of the specified timer to the larger multiple of the
resolution.
Test Information:
With resolution of 0 seconds, 818 nanoseconds
Expected value 0 seconds, 999998457 nanoseconds
To be rounded up to 1 seconds, -726 nanoseconds
Received 0 seconds, 999999274 nanoseconds
************************************************************************Review Information
Review Type TSMA Review Start Date 2004-03-25 03:45 Last Updated 2004-03-25 18:11 Completed 2004-03-25 18:11 Status Complete Review Recommendation Test Suite Deficiency (TSD) Review Response This is accepted as a fault in the test suite.
Note that the submitter's problem statement is misleading. He has
quoted the wrong piece of code. It is the second part of the test that
has the problem, where these lines:
quant = (1000000000/res.tv_nsec);
tp2.it_interval.tv_sec = 0;
tp2.it_interval.tv_nsec = (res.tv_nsec*(quant-1))+1;
expect.it_interval.tv_sec=1;
expect.it_interval.tv_nsec=(quant*res.tv_nsec)-1000000000;
only work correctly if res.tv_nsec divides exactly into 1000000000.
It may be worth updating the Problem Summary in the PR to say "does not
divide exactly into 1 second" instead of "is not a even multiple of
1 second".
Review Type SA Review Start Date 2004-03-25 18:11 Last Updated 2004-03-26 07:27 Completed 2004-03-26 07:27 Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion This PR represents an agreed test suite deficiency. Please note the
TSMA remarks
Problem Reporting System Options:
- View Report 2349
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority