|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1059 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 1059.
Report 1059 Actions
Problem Report Number 1059 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0296 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSRT version 5.0.1 Test Identification rt.os/timers/timer_settime 9 Problem Summary PG4R.00008 Implementation reports values different from those produced by rounding. Problem Text
The test case 9 has the following test assertion:
If _POSIX_TIMERS is defined or the implementation sup-
ports the timer_settime() function as described in Sys-
tem Interfaces and Headers, Issue 5:
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
The cited text continues: Quantization errors shall not cause the timer
to expire earlier than the rounded time value. Thus the topic of the
paragraph is the relationship between the expiration of the timer
and the underlying clock.
The test case code interprets the standard that the time values
that are rounded will be returned to the user when calls to timer_settime()
and timer_gettime() are executed. The standard does state that the
implementation shall do rounding.
It does not state that the structures itimerspec value and ovalue passed to
timer_settime() or timer_gettime() will contain or have the results of the
rounding performed on the members of the structure.
On page 947 of XSH5, the following paragraph to the one cited above:
If the argument ovalue is not NULL, the function timer_settime()
stores, in the location referenced by ovalue, a value representing
the previous amount of time before the timer would have expired
or zero if the timer was disarmed, together with the previous timer
reload value. The members of ovalue are subject to the resolution
of the timer, and they are the same values that that would be
returned by a timer_gettime() call at this point in time.
The standard does not state that the rounding of the interval
will be returned. It does state that "...The members of ovalue are
subject to the resolution of the timer..". The members of ovalue
may have a result that combines a rounding and the time until
the timer would have expired but not the explicit rounding for one
interval.Test Output
400|4 9 1 15:34:17|IC Start
200|4 9 15:34:17|TP Start
520|4 9 00000911 1 1|With resolution of 0 seconds, 1000 nanoseconds
520|4 9 00000911 1 2|Expected value 0 seconds, 1001 nanoseconds
520|4 9 00000911 1 3|To be rounded up to 0 seconds, 2000 nanoseconds
520|4 9 00000911 1 4|Received 0 seconds, 10000000 nanoseconds
520|4 9 00000911 1 5|With resolution of 0 seconds, 1000 nanoseconds
520|4 9 00000911 1 6|Expected value 0 seconds, 999999001 nanoseconds
520|4 9 00000911 1 7|To be rounded up to 1 seconds, 0 nanoseconds
520|4 9 00000911 1 8|Received 0 seconds, 999999001 nanoseconds
220|4 9 1 15:34:17|FAIL
410|4 9 1 15:34:17|IC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
This test validates the requirements of the spec as written while the
implementation is producing inconsistent, inaccurate and non-conforming
results.
What's being tested here is the rounded-ness of the reload value returned
by timer_settime. Since this reload value does not tick down it is a
stable value to test, unlike the time until timer expiration, which is
thus not covered by the test.
The implementation has a 1000 nanosecond resolution. In the first
case in the results above it returns 0 seconds, 10000000 nanoseconds
for a relaod value set to 0 seconds, 1001 nanoseconds. This is neither
the rounded up reload value, as the test expects, nor the original
unrounded value, it just seems inexplicably wrong.
In the second case the implementation returned 0 seconds, 999999001
nanoseconds for a reload value set to the same value. Unlike the first
case this behavior is the unrounded reload value. However we see nothing
in the spec which justifies this behavior, as it does clearly require
rounding by the implementation.
The specification states:
Time values that are between two consecutive non-negative integer
multiples of the resolution of the specified timer will be rounded
up to the larger multiple of the resolution.
. . .
<for timer_settime> The members of ovalue are subject to the
resolution of the timer, and they are the same values that would
be returned by a timer_gettime() call at that point in time.
So, in checking the reload value returned by timer_settime the test is
correctly expecting a rounded up value as a) the values returned by
timer_settime are subject to the resolution of the timer, and b)
values are rounded up if they are not a multiple of this resolution.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 1059
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority