|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1663 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 1663.
Report 1663 Actions
Problem Report Number 1663 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0467 Raised 1999-07-22 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 VSU version 5.0.4 Test Identification CAPIbase/close 3, 5, 6 Problem Summary PG4U.00170 close() does not return immediately Problem Text
These tests do the following:
Open master/slave ptys
write data onto the slave pty
set completion alarm
close the slave pty
read the master pty
close the master pty
However, the close of the slave pty waits because data is still
on the STREAM. This causes the alarm to step in and end the test.
This expected behavior for the slave pty, page 135 of the XSH5
states the following:
"... If O_NONBLOCK is not set and there have been no signals posted for
the STREAM, and if there is data on the module's write queue, close()
waits for unspecified time (for each module and driver) for any output
to drain before dismantling the STREAM."
The test writes data onto the stream and then tries to close the slave.
>From the statement above this close is allowed to take an unspecified
time, so the slave's close could wait forever. Also note that a pty
is supposed act exactly like a tty(page 26 of the XBD5). The close on
the send tty would wait for the receiving tty to read the data on the buffer.Test Output
TEST CASE: close
TEST PURPOSE #3
The last successful call to int close(int fildes) for
fildes when fildes is associated with a STREAM,
O_NONBLOCK is not set for fildes, and no signals are
posted for the STREAM shall wait for each module and
driver with data on it's write queue to drain its
output before dismantling the STREAM.
PREP: Open master pseudo tty
PREP: Determine if pseudo tty is a stream
PREP: Open slave pseudo tty
PREP: Ignore any signals
PREP: Push modules on the STREAM
PREP: Write data into STREAM
PREP: Close end of STREAM
ERROR: Alarm expired awaiting completion
3 UNRESOLVED
TEST PURPOSE #5
The last successful call to int close(int fildes) for
fildes when fildes is associated with a STREAM and
signals are posted for the STREAM shall dismantle the
STREAM immediately, even if data is on a module's or
driver's write queue.
PREP: Open master pseudo tty
PREP: Determine if pseudo tty is a stream
PREP: Open slave pseudo tty
PREP: Hold any SIGPOLL signals
PREP: Push modules on the STREAM
PREP: Register for S_OUTPUT signals
PREP: Set O_NONBLOCK on write end
PREP: Set O_NONBLOCK on read end
PREP: Fill stream with data
PREP: Drain some data end to generate SIGPOLL
PREP: Restore O_NONBLOCK on write end
PREP: Close write end of STREAM
ERROR: Alarm expired awaiting completion
5 UNRESOLVED
TEST PURPOSE #6
The last successful call to int close(int fildes) for
fildes when fildes is associated with a STREAM and
O_NONBLOCK is set for fildes shall dismantle the
STREAM immediately, even if data is on a module or
driver's write queue.
PREP: Open master pseudo tty
PREP: Determine if pseudo tty is a stream
PREP: Open slave pseudo tty
PREP: Ignore any signals
PREP: Push modules on the STREAM
PREP: Set O_NONBLOCK on write end
PREP: Write data into STREAM
PREP: Close end of STREAM
ERROR: Alarm expired awaiting completion
6 UNRESOLVEDReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
It is agreed that there is a potential problem with test 3 because the
test does not use the stream module close time as the delimiter for the
time needed by the stream dismantle procedure.
The other two tests (5 and 6) require that the close() returns immediately
and there should be no delay since the O_NONBLOCK flag is set or there are
signals posted to the stream. The quoted text does not apply in these
circumstances.
It is recommended that this request is refused.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused. Please note the comment about test 3.
Problem Reporting System Options:
- View Report 1663
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority