|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0151 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 0151.
Report 0151 Actions
Problem Report Number 0151 Submitter's Classification Test Suite problem State Resolved Resolution Test Suite Deficiency (TSD) Problem Resolution ID TSD.X.0151 Raised 1994-05-05 08:00 Updated 2003-03-13 08:00 Published 1994-06-08 08:00 Product Standard Internationalised System Calls and Libraries (XPG4) Certification Program The Open Brand certification program Test Suite VSX4 version 4.3.2 Test Identification POSIX.os/devclass/tcdrain 1, 3, 4, 8, 9, 10, 11 Linked Problem Reports PG3.591, (in, old, system) Problem Summary TSD4.151 These tests fail because they calculate how many bytes can be sent through a serial port in ten seconds and have one process write that many bytes. Another process waits three seconds then does a tcdr... Problem Text
These tests fail because they calculate how many bytes can be sent
through a serial port in ten seconds and have one process write that
many bytes. Another process waits three seconds then does a tcdrain()
followed by a write of a marker byte.
So, these tests assume that a stream can buffer up nearly seven seconds
of data at the operating baud rate (default 9600). This is not true for
us. We have set ldterm's maximum packet size and high water mark to
fairly low values. As a result, the stream head chops up the first
process's large write into many 256 byte packets. The M_IOCTL message
that tcdrain() sends downstream will be queued up behind the data and
eventually arrive at the device driver, where it will wait until the
driver has drained its output queue before returning. At that point,
the second process will write the marker byte. However, the first
process may still be writing data into the stream. If so, then the
marker byte will be interleaved with the other data.
10 seconds of data at 9600 baud is approximately 9600 bytes.
The tests fail at around 7 to 8 kbytes for our serial I/O boards.Test Output
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 1 Failed
Test Description:
If general terminal interface supported:
tcdrain() causes all pending output to be written to the terminal
before the call returns, and then returns zero.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-04(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to terminal file using write() that will take READ_TIME
seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ loop back file using read() until read returns an error or
BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not interleaved
PARENT process:
SLEEP to allow write to terminal file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to terminal file using tcdrain()
SET time out for WAITTIME/2
WRITE data to terminal file using write() to test interleaving
VERIFY that tcdrain() returned zero
Test Information:
tcdrain() failed - interleaved character at 6912
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 3 Failed
Test Description:
If general terminal interface supported:
If _POSIX_JOB_CONTROL is implemented, when tcdrain() is called from
a background process, that is blocking the SIGTTOU signal, a
SIGTTOU signal shall not be sent to the process group associated
with the calling process and the tcdrain() actions shall be
performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-07(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE child process
CHILD process:
CREATE new background process group using setpgid(0, 0)
SET signal action for SIGTTOU to signal catching function
BLOCK signal SIGTTOU using sigprocmask()
CREATE process pair
CHILD process:
SET signal action for signal SIGTTOU to signal catching function
SLEEP for WAITTIME/2 (to receive signal, if any)
PARENT process:
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to terminal file using write() that will take
READ_TIME seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ loop back file using read() until read returns an error
or BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not
interleaved
PARENT process:
SLEEP to allow write to terminal file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to terminal file using tcdrain()
SET time out for WAITTIME/2
WRITE data to terminal file using write() to test interleaving
VERIFY that tcdrain() returned zero
VERIFY that SIGTTOU signal was not received by child process
Test Information:
tcdrain() failed - interleaved character at 7424
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 4 Failed
Test Description:
If general terminal interface supported:
If _POSIX_JOB_CONTROL is implemented, when tcdrain() is called from
a background process, that is ignoring the SIGTTOU signal, a
SIGTTOU signal shall not be sent to the process group associated
with the calling process and the tcdrain() actions shall be
performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-06(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE child process
CHILD process:
CREATE new background process group using setpgid(0, 0)
SET signal action for SIGTTOU to SIG_IGN
CREATE process pair
CHILD process:
SET signal action for signal SIGTTOU to signal catching function
SLEEP for WAITTIME/2 (to receive signal, if any)
PARENT process:
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to terminal file using write() that will take
READ_TIME seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ loop back file using read() until read returns an error
or BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not
interleaved
PARENT process:
SLEEP to allow write to terminal file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to terminal file using tcdrain()
SET time out for WAITTIME/2
WRITE data to terminal file using write() to test interleaving
VERIFY that tcdrain() returned zero
VERIFY that SIGTTOU signal was not received by child process
Test Information:
tcdrain() failed - interleaved character at 7424
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 8 Failed
Test Description:
If general terminal interface supported:
when tcdrain() is called from a foreground process, and when fildes
refers to a non-controlling terminal, the tcdrain actions shall be
performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-X1(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to loop back file using write() that will take
READ_TIME seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ terminal file using read() until read returns an error or
BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not interleaved
PARENT process:
SLEEP to allow write to loop back file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to loop back file using tcdrain()
SET time out for WAITTIME/2
WRITE data to loop back file using write() to test interleaving
VERIFY that tcdrain() returned zero
Test Information:
tcdrain() failed - interleaved character at 7168
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 9 Failed
Test Description:
If general terminal interface supported:
when tcdrain() is called from a background process, that is not
blocking or ignoring the SIGTTOU signal, and when fildes refers to
a non-controlling terminal, the tcdrain actions shall be performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-X2(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
FOR termio flag TOSTOP set and clear:
CREATE child process
CHILD process:
CREATE new background process group using setpgid(0, 0)
SET signal action for SIGTTOU to signal catching function
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to loop back file using write() that will take
READ_TIME seconds
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ terminal file using read() until read returns an error or
BUFLEN characters read
PARENT process:
SLEEP to allow write to loop back file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to loop back file using tcdrain()
VERIFY that SIGTTOU signal was received
Test Information:
tcdrain() failed - interleaved character at 7424
when TOSTOP flag was clear
when TOSTOP flag was set
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 10 Failed
Test Description:
If general terminal interface supported:
when tcdrain() is called from a background process, that is
blocking the SIGTTOU signal, and when fildes refers to a non-
controlling terminal, the tcdrain actions shall be performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-X3(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE child process
CHILD process:
CREATE new background process group using setpgid(0, 0)
SET signal action for SIGTTOU to signal catching function
BLOCK signal SIGTTOU using sigprocmask()
CREATE process pair
CHILD process:
SET signal action for signal SIGTTOU to signal catching function
SLEEP for WAITTIME/2 (to receive signal, if any)
PARENT process:
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to loop back file using write() that will take
READ_TIME seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ terminal file using read() until read returns an error or
BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not
interleaved
PARENT process:
SLEEP to allow write to loop back file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to loop back file using tcdrain()
SET time out for WAITTIME/2
WRITE data to loop back file using write() to test interleaving
VERIFY that tcdrain() returned zero
VERIFY that SIGTTOU signal was not received by child process
Test Information:
tcdrain() failed - interleaved character at 8448
************************************************************************
************************************************************************
/tset/POSIX.os/devclass/tcdrain/T.tcdrain 11 Failed
Test Description:
If general terminal interface supported:
when tcdrain() is called from a background process, that is
ignoring the SIGTTOU signal, and when fildes refers to a non-
controlling terminal, the tcdrain actions shall be performed.
Posix Ref: Component TCDRAIN Assertion 7.2.2.2-X4(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE child process
CHILD process:
CREATE new background process group using setpgid(0, 0)
SET signal action for SIGTTOU to SIG_IGN
CREATE process pair
CHILD process:
SET signal action for signal SIGTTOU to signal catching function
SLEEP for WAITTIME/2 (to receive signal, if any)
PARENT process:
CREATE process pair
CHILD process:
CREATE process pair
CHILD process:
WRITE data to loop back file using write() that will take
READ_TIME seconds
VERIFY that write() returns size of data written
PARENT process:
SET time out for READ_TIME + WAITTIME/2
READ terminal file using read() until read returns an error or
BUFLEN characters read
VERIFY that read returned BUFLEN characters
VERIFY that data written after tcdrain() called is not
interleaved
PARENT process:
SLEEP to allow write to loop back file to begin
SET time out for READ_TIME + WAITTIME/2
WAIT for completion of output to loop back file using tcdrain()
SET time out for WAITTIME/2
WRITE data to loop back file using write() to test interleaving
VERIFY that tcdrain() returned zero
VERIFY that SIGTTOU signal was not received by child process
Test Information:
tcdrain() failed - interleaved character at 7424
************************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
It is accepted that this is caused by a timing fault in the test suite
and it is recommended that this problem be considered 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 0151
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority