|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0201 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 0201.
Report 0201 Actions
Problem Report Number 0201 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0201 Raised 1995-01-05 08:00 Updated 2003-03-13 08:00 Published 1995-01-18 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.4 Test Identification XOPEN.os/time/clock 2 Problem Summary TSD4.201 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 an independant CPU time
approximation.Test Output
/tset/XOPEN.os/time/clock/T.clock 2 Failed
Test Description:
The time reported is the sum of user and system times of the calling
process and terminated child processes for which it has executed
wait() or system().
(See PARAMETERS : VSX_CLOCK_ERR below)
Test Strategy:
CALL clock() and times(), saving CPU times given by times()
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() 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 140000 microseconds
CPU time as given by clock is 99618 microsecondsReview 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 0201
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority