|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0429 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 0429.
Report 0429 Actions
Problem Report Number 0429 Submitter's Classification Specification problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0048 Raised 1993-11-24 08:00 Updated 2003-03-13 08:00 Published null 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 Problem Summary PG4R.048 c_iflag 19 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. Th... Problem Text
c_iflag 19
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 fails due to the failure in the previous test case
(c_iflag 19). It executes flushes (using tcflush(...., TCIOFLUSH)) on
both loop and tty side of its loopback construct, and expects
all data to now be removed. This is not the case, however, due
to the way the loopback is constructed. This test case passes if
test case 19 is not executed.
The masters from both the loop side and the tty side are connected
through the use of two user processes. One process reads from the
loop side and writes to the tty side, and the other process does the
opposite. This is where the trouble lies: The previous test case
finds the "capacity" of the loopback by writing until the write()
blocks, then reading all the data. Then it floods the loopback
with this same amount of data, and fails for the reasons mentioned
in the previous explanation. This leaves the loopback with all
queues full, and also one of the user process that connects the two
masters is blocked, waiting to write.
Now, test case 20 tries to clear the construct, by flushing both the
tty and loop side. However, this does not remove the data that
is held by the connecting process which is blocked on write.
The flushes clear all the queues. The process that had been blocked
on the write now puts the 47 bytes left over from test case 19 into
the read queue on the tty side. Thus, test 20 will always see the extra
47 bytes of data (which is the string that was continually written in
c_iflag 19), and will always 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
A temporary interpretation has already been granted for these two tests
pending a resolution of the interpretation via the IEEE interpretations
process. This interpretation has not yet been completed.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused. Please refer to TIN4.007.
Problem Reporting System Options:
- View Report 0429
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority