|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0828 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 0828.
Report 0828 Actions
Problem Report Number 0828 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0343 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1996-02-28 08:00 Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 4.1.5 Test Identification POSIX.upe/ps 1004 Problem Summary TSD4C.00168 This test may fail on implementations because a valid session id list may not be generated by the test. Problem Text
This test may fail on implementations because a valid
session id list may not be generated by the test.
Reference: TSD4C.00028
Note: Version 4.1.5 was changed to address this failure.
However, the change was insufficient as explained below.
This test case fails on platforms which require the grouplist
argument to -g to contain only session leaders.
The test case uses 'ps -o pgid=""' to generate a list of process ids.
It then tests every pid through individual "ps -g $pid" calls to
determine which ones are session leaders, before invoking "ps -g"
with the final list of pids which are truly session leaders.
The problem with the test case is that 'ps -o pgid=""' does not find
session leaders, but only process group leaders. Process group leaders
are not necessarily session leaders. In this instance there were
no session leaders found to pass to 'ps -g', and the test failed.
POSIX.2 definitions state:
process group leader: A process whose process ID is the same
as its process group ID. (POSIX.2 pg. 32, lines 836-837)
session leader: A process that has created a session.
(POSIX.2 pg. 34, lines 913-914)
session: A collection of process groups established for job
control purposes. (POSIX.2 pg. 34, lines 905-906)
Therefore process group leaders and session leaders are not equivalent.
The X/Open CAE specifications, Commands and Utilities Issue 4,
Version 2 (pg. 593) states for the ps -g option:
-g grouplist
write information for processes whose session leaders are
given in grouplist. The grouplist must be a single
argument in the form of a blank- or comma-separated list.
And for the -o option, with regards to the pgid format specification
(pg 595):
pgid: The decimal value of the process group ID
The first specification verifies that the -g option should be testing
for session leaders, not process group leaders. The latter verifies
that the -o pgid="" specification will only list process group IDs,
not session IDs.
A portable workaround for finding session leaders is to do 'ps -o ppid=""'.
The parent pid of one of the process group leaders should be a
session leader. The pids should then be tested individually through
calls to 'ps -g' to find the session leader, then the final 'ps -g'
test can be performed.
A workaround which uses HP-UX proprietary behavior, but is more
straightforward: 'ps -o sid=""' will generate a list of
session leaders. This can then be input directly to the final 'ps -g'
since the pids have all been verified to be session leaders.Test Output
200|412 1 09:50:13|TP Start
520|412 1 3708 1 1|Assertion #1004 (A): ps -g writes information whose session
520|412 1 3708 1 2| <LC> leaders are given in grouplist.
520|412 1 3708 1 11|Expected exit code = 0; Received 1
520|412 1 3708 1 12|Expected exit code = 0; Received 1
220|412 1 1 09:50:14|FAIL
410|412 1004 1 09:50:14|IC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We agree this is a test suite deficiency in the test
suite version(s) listed.
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 0828
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority