Report 0019 Actions
Problem Report Number |
0019 |
Submitter's Classification |
Test Suite problem |
State |
Resolved |
Resolution |
Rejected (REJ) |
Problem Resolution ID |
REJ.PX.0012 |
Raised |
2004-06-24 06:29 |
Updated |
2004-06-30 20:07 |
Published |
2004-06-30 20:07 |
Product Standard |
1003.1-2003 System Interfaces |
Certification Program |
POSIX Certified by IEEE and The Open Group |
Test Suite |
VSX-PCTS2003 version 1.0B |
Test Identification |
/tset/POSIX.os/procprim/sigconcept/T.sigconcept 35 |
Location in Spec |
Volume 2, section 2.4.4 |
Problem Summary |
A sigconcept test assumes that stopping a proccess stops reads from
occuring to its buffers. |
Problem Text |
Section 2.4.4 states "If the action of the signal is to stop the
process, the process shall stop until continued or terminated.
Generation of a SIGCONT signal for the process shall cause the process
to be continued, and the original function shall continue at the point
the process was stopped."
Signal Concept test 35 interpretes this to mean that if a process
issues a read call which blocks and then process receives a STOP
signal, a matching write call which would normally fill the read
buffer an unblock the task has no effect. It does this by testing
that SIGCONT with a signal handler to the blocked, reading process
interrupt read() before any data is read.
Our interpretation allows the write to fill the read buffer. When the
reading process receives SIGCONT and the function is interrupted, it
does not return EINTR because data was transferred.
Analogous situations occur while blocking on open(), fnctl(), and write
(). |
Test Output |
/tset/POSIX.os/procprim/sigconcept/T.sigconcept 35 Failed
Test Description:
If _POSIX_JOB_CONTROL is defined, when any of the functions fcntl(),
open(), pause(), read(), sleep(), sigsuspend(), tcdrain(), wait(),
waitpid(), and write() are stopped by the delivery of a signal whose
action is to stop the process, the subsequent generation of a SIGCONT
signal that is being caught by a signal catching function shall cause
the process to continue after returning from the signal catching
function with the function reporting that it has been interrupted by
the SIGCONT signal.
Posix Ref: Component Signal Concepts Assertion 3.3.1.4-48(C)
Posix Ref: Component Signal Concepts Assertion 3.3.1.4-49(C:D)
Test Strategy:
FOR each of the test functions tcdrain(), fcntl(), sleep(), pause(),
sigsuspend(), read(), write(), open(), wait(), waitpid():
IF terminal output is buffered or not testing tcdrain
FORK a child process
CHILD process:
CREATE new process group using setpgid(0,0)
SET the SIGCONT signal action to signal catching function
SET the SIGSTOP signal action to SIG_DFL
IF testing wait() or waitpid()
FORK a child process which sleeps for 2.5 * WAITTIME
CALL the test function
PARENT process:
SET alarm for time WAITTIME
WAIT for the child process to obtain the child status
VERIFY the child process is active
SEND the SIGSTOP signal to the child process
SLEEP for WAITTIME
WAIT for the child process to obtain the child status
VERIFY the child process stopped
CALL a variable function dependent on the test function which
will cause the test function to continue after SIGCONT is
received
SEND the SIGCONT signal to the child process
CHILD process:
VERIFY that test function returned an error with errno set to
EINTR
IF testing wait() or waitpid()
KILL the child process waited for
EXIT
PARENT process:
WAIT for the child process to obtain the child status
VERIFY the child process exited
Test Information:
function reported no interruption by stopping or SIGCONT signal
fcntl() returned 0 errno 32, should return -1 errno 4
function reported no interruption by stopping or SIGCONT signal
read() returned 1 errno 32, should return -1 errno 4
function reported no interruption by stopping or SIGCONT signal
write() returned 1 errno 32, should return -1 errno 4
function reported no interruption by stopping or SIGCONT signal
open() returned 9 errno 32, should return -1 errno 4
|
Review Information
Review Type |
TSMA Review |
Start Date |
2004-06-24 06:29 |
Last Updated |
2004-06-24 18:52 |
Completed |
2004-06-24 18:52 |
Status |
Complete |
Review Recommendation |
Rejected (REJ) |
Review Response |
This test does appear to be too strict in its testing of read() and
write(). These functions do not always indicate an EINTR error when
interrupted, and the test should allow for that. However, the same does
not apply to fcntl() and open().
XSH6 section 2.4.4 Signal Effects on Other Functions states:
"Signals affect the behavior of certain functions defined by this volume
of IEEE Std 1003.1-2001 if delivered to a process while it is executing
such a function. [...] If the action of the signal is to invoke a
signal-catching function, the signal-catching function shall be invoked;
in this case the original function is said to be ``interrupted'' by the
signal. If the signal-catching function executes a return statement, the
behavior of the interrupted function shall be as described individually
for that function"
Since, as indicated by the submitter, a SIGCONT causes the process to
continue "at the point the process was stopped", and in the test the
process was stopped while executing the open() or fcntl() function, this
means the SIGCONT signal is delivered to the process "while it is
executing" open() or fcntl() respectively, and the above text from 2.4.4
therefore applies to this delivery of this SIGCONT signal.
The behaviour described individually for open() and fcntl() when
interrupted is to indicate an EINTR error, and therefore the test is
right to expect EINTR in those cases. |
Review Type |
SA Review |
Start Date |
2004-06-24 17:52 |
Last Updated |
2004-06-30 20:07 |
Completed |
2004-06-30 20:07 |
Status |
Complete |
Review Resolution |
Rejected (REJ) |
Review Conclusion |
The case for a waiver has not been made for all four
interfaces cited. It is agreed that the tests are too strict
for the read() and write() cases (see the TSMA response)
and a waiver could be requested separately for those.
However fcntl() and open() are expected to return EINTR in this case.
This request is rejected. |
Problem Reporting System Options:
|