|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0355 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 0355.
Report 0355 Actions
Problem Report Number 0355 Submitter's Classification Specification problem State Resolved Resolution Temporary Interpretation (TIN) Problem Resolution ID TIN.X.0007 Raised 1993-10-22 08:00 Updated 2003-03-13 08:00 Published 1993-10-27 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.2.4 Test Identification POSIX.os/devclass/c_iflag 19, 20 Specification System Interfaces and Headers Issue 4 Location in Spec See Problem Text Problem Summary TIN4.007 This test case enables START/STOP input control by setting the XOFF flag in the terminal device. It also enables START/STOP output control by setting the XON flag in the loopback device. The test case... Problem Text
This test case enables START/STOP input control by setting the XOFF
flag in the terminal device. It also enables START/STOP output control
by setting the XON flag in the loopback device. The test case then fills
up the input queue of the terminal device by writing to the loopback device.
Following this, it reads from the loopback device, expecting
a STOP character to be in the input (the terminal device should
have sent a STOP character when its input queue was filled).
Next, the test case reads all of the data from the terminal device,
emptying its input queue. Following this, it reads from the loopback
device, expecting a START character to be in the input (the terminal device
should have sent a START character when its input queue was emptied).
These tests fail on SVR4-based systems due to the way XON/XOFF
is implemented. The implementation of XON/XOFF is done with ioctls
(M_START, M_STOP, M_STOPI, and M_STARTI) in a manner similar to the
implementation of tcflow() in SVR4. No START/STOP character is
actually written to the data stream. Therefore, no STOP/START
character will be present in the data read from the loopback connection.
c_iflag 20
This test case sometimes fails because all data written in the previous
test case (c_iflag 19) is not always flushed when flushem() is performed
in the setup. The test case expects all data remaining from previous test
cases in the input and output queues of both the terminal device and
the loopback device to be flushed in flushem() when tcflush(..., TCIOFLUSH)
is executed.
This test case will sometimes work and sometimes fail because it
is timing dependent due to the way SVR4-based pseudo ttys are
set up in XPG4. When the data is flushed from the loopback connection,
it is possible that the process reading data from the tty connection
has read some data from the stream head and has not yet written it to the
loopback connection before the flush of the data on the loopback connection
is executed. Similarly, when the data is flushed from the tty connection,
it is possible that the process reading data from the loopback connection
has read some data from the stream head and has not yet written it to the
tty connection before the flush of the data on the tty connection is
executed. The result of all data not being flushed is that it can be read
by subsequent reads, causing the test case to fail.Test Output
************************************************************************
/tset/POSIX.os/devclass/c_iflag/T.c_iflag 19 Failed
Test Description:
If general terminal interface supported:
When IXOFF is set the system shall transmit one or more STOP
characters as needed to prevent the number of characters in the
input queue from exceeding its capacity. The system shall transmit
one or more START characters as needed to start transmitting data.
CONDITIONAL: If _POSIX_MAX_INPUT <= MAX_INPUT <= PCTS_MAX_INPUT
assertion is base (type C) otherwise assertion is extended (type
D).
Posix Ref: Component Settable Parameters Assertion 7.1.2.2-32(C:D)
Posix Ref: Component Settable Parameters Assertion 7.1.2.2-33(C:D)
Test Strategy:
OPEN and initialise terminal file and loop back file (having SAME
parity)
OBTAIN max_input from fpathconf(tty_fildes, _PC_MAX_INPUT)
SET IXON, VMIN=0 and VTIME=10 in loop back control flags
CLEAR ICANON in loop back control flags
SET IXOFF, VMIN=0 and VTIME=10 in terminal control flags
CLEAR ICANON in terminal control flags
CREATE child process
UNTIL a timeout occurs
SET TIMEOUT of WAITTIME/2 seconds
WRITE string to loop back file
FLUSH output queue on loop back file using tcflush(fd, TCOFLUSH)
READ entire input queue from terminal file
SET capacity to the greater of the number of bytes read and
max_input
CLEAR IXON in loop back control flags
UNTIL capacity bytes have been written
WRITE string to loop back file
SLEEP to allow data to transfer to terminal file
READ from loop back file
VERIFY that read() read at least one STOP character
UNTIL capacity bytes have been read or a read error occurs
READ from terminal file
SLEEP to allow more data to become available
VERIFY that capacity bytes in total were read
READ from loop back file
VERIFY that read() read at least one START character
Test Information:
after input queue filled to 1598 bytes, attempt
to read() STOP character(s) returned 0, expected >= 1
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/c_iflag/T.c_iflag 20 Failed
Test Description:
If general terminal interface supported:
When IGNCR and ICRNL are both clear, a received CR character is not
altered during input processing.
Posix Ref: Component Settable Parameters Assertion 7.1.2.2-27(C)
Test Strategy:
OPEN and initialise terminal file and loop back file (having SAME
parity)
SET VMIN to 1 and VTIME to 0
CLEAR ICRNL, IGNCR and ICANON in terminal control flags
WRITE one character CR to loop back file
VERIFY that read() from terminal file returned 1
VERIFY that read() read character CR
Test Information:
read() returned 48, expected 1
************************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This is the subject of a current POSIX interpretation and it is recommended
that a temporary interpretation is granted pending the outcome of the
discussions at the POSIX level.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Temporary Interpretation (TIN) Review Conclusion
A temporary interpretation is granted.
Problem Reporting System Options:
- View Report 0355
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority