|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0227 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 0227.
Report 0227 Actions
Problem Report Number 0227 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0227 Raised 1995-08-31 08:00 Updated 2003-03-13 08:00 Published 1995-09-03 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.5 Test Identification XOPEN.os/time/clock 2 Linked Problem Reports TSD4.201, (in, old, system) Problem Summary TSD4.227 This test is making an incorrect assumption of the clock() function. The XPG4 standard does not say that clock() should report the CPU time of child processes: "DESCRIPTION The {clock()} function retu... Problem Text
This test is making an incorrect assumption of the clock() function.
The XPG4 standard does not say that clock() should report the CPU time
of child processes:
"DESCRIPTION
The {clock()} function returns the implementation's best
approximation to the processor time used by the process since the
beginning of an implementation-dependent time related only to the
process invocation."
The phrase "used by the process" is key. We believe the standard says
that if clock() returns the time used by child processes, it would be
working incorrectly.
The test should not be using the tms_cutime components of the tms
structure returned by times() to arrive at the independant CPU time
approximation.Test Output
***********************************************************************
/tset/XOPEN.os/time/clock/T.clock 2 Failed
Test Description:
The time reported by clock() is the sum of user and system times of
the calling process and terminated child processes for which it has
obtained the wait status.
Test Strategy:
IF XPG3 mode:
CALL clock() and discard its return value
SET initial time value to 0
OTHERWISE
CALL clock() and set initial time value to its return value
CALL times() and save the CPU times it returns
EXECUTE user and system code, using use_time() and sys_call()
CREATE child process
EXECUTE user and system code, using use_time() and sys_call()
VERIFY that the value returned by clock() minus the initial time value
agrees with the increase in CPU times given by times() to within
VSX_CLOCK_ERR percent
Test Information:
CPU time used as given by clock() does not correspond to value given by
times() within tolerance limits
CPU time as given by times is 450000 microseconds
CPU time as given by clock is 243015 microseconds
******************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
The test suite aligns with the statements in XPG3 rather than those
in XSH4. The CHANGE HISTORY section of XSH4 states that the changes
made in the Issue 4 update are "functionally equivalent to Issue 3".
This statement seems to be misleading since in XPG3 it states that:
"The clock() function returns the amount of CPU time used since the
first call to clock()"
and in XSH4 it states that:
"The clock() function returns .... the processor time used since the
beginning of ...... time related only to the process invocation."
The current code follows the strategy defined for XPG3 and needs to be
aligned with the XSH4 description.
A permanent waiver is recommended on the basis of a test suite deficiency.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Test Suite Deficiency (TSD) Review Conclusion
This is an agreed Test Suite Deficiency.
Problem Reporting System Options:
- View Report 0227
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority