|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0300 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 0300.
Report 0300 Actions
Problem Report Number 0300 Submitter's Classification Test Suite problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0016 Raised 1993-12-04 08:00 Updated 2003-03-13 08:00 Published 1994-01-19 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/tcsendbrea 9-12 Specification System Interfaces and Headers Issue 4 Location in Spec See Problem Text Problem Summary PIN4.016 Tests 9 through 12 fail and/or are unresolved when they are run as members of the tcsendbrea testset. When run individually or as a sequence 9-12 or even 7-12, without running any of the remaining tes... Problem Text
*********************************************************************
Tests 9 through 12 fail and/or are unresolved when they are run as
members of the tcsendbrea testset. When run individually or as a
sequence 9-12 or even 7-12, without running any of the remaining
tests (ie: 1-6), they all pass successfully.
Explanation for the above is as follows:
a) the tcsendbrea testset begins by calling termios_prep() which
will make the parent process become a session leader, initializes
and open the terminal ports using file descriptors tty_fildes and
loop_fildes, and then makes tty_fildes the session leader's
controlling terminal.
b) tests 1-6 are child processes, they all call break_up() with
break_prep_mode set to USE_CTTY. break_up() creates a new session
leader using setsid(), reopen loop_fildes using opnctl(), thereby
establishing loop_fildes as a controlling terminal of the new
session. Tests 1-6 then verify various tcsendbreak assertions on
tty_fildes.
c) Test 9 also calls break_prep() but with break_prep_mode set to
USE_NON_CTTY. Break_prep() in this case does not reopen the loopback
port but assigns to loop_fildes its previous value saved in
loop_fildes_keep during termios_prep().
It is to be noted at this point that in our implementation, when a
process becomes a session leader and acquires a controlling terminal,
when the process exits, the file descriptors of the controlling
terminal are disassociated on a system wide basis.
Given the above behavior, the port associated with loop_fildes is
disconnected upon exit of test 6, and when test 9 later on tries
to send a break to loop_fildes using tcsendbreak(), the test fails
to perform the action since the file descriptor is no longer valid.
When test 9 is run individually, the testset is now reduced to
termios_prep() and test9(). tty_fildes and loop_fildes are valid
file descriptors after the termios_prep() call and test 9 executes
successfully.
The assertion for test 9, "when tcsendbreak() is called from a
foreground process, and when fildes refers to a non-controlling
terminal, the tcsendbreak actions shall be performed", is verified
when test 9 is run individually because the action is made on
loop_fildes which in this case is not being associated with a
controlling terminal.
d) tests 10, 11, and 12 begin by performing tcflush() on the
loop_fildes file descriptor. The three tests are getting Unresolved
because tcflush() is called on an invalid file descriptor which port
has being disconnected after test 6 given our system wide behavior,
and hence giving EIO errors as if modem disconnect.
When test #10 through #12 are run individually or even in the
sequence 9-12, they all run successfully.
From the above observations it is apparent that the failures are
not due to a non-conforming tcsendbreak() API, but rather to the
controlling terminal behavior described in XPG4 as follows:
"When a controlling process terminates, the controlling terminal
is disassociated from the current session, allowing it to be
acquired by a new session leader. Subsequent access to the terminal
by other processes in the earlier session may be denied, with
attempts to access the terminal treated as if modem disconnect had
been sensed"
Although it appears that XPG4 only requires terminal disassociation
to affect processes in the session whose leader had exited, it also
never specifed that processes in subsequent sessions must be able
to access the terminal associated with the exited controlling process.
This seems to be the required behavior from the tcsendbrea testset.
We believe our system behavior is not in conflict with what is being
specified in XPG4, and that such behavior should be considered as an
extension. This is a BSD behaviour we have had for years, and had not
affected our conformance to XPG until VSX4.
We request that a waiver be granted to the above failures which are
due to a test strategy that is based on an assertion that is not
being specified by the Standard.
*********************************************************************Test Output
************************************************************************
/tset/POSIX.os/devclass/tcsendbrea/T.tcsendbrea 9 Failed
Test Description:
If general terminal interface supported:
when tcsendbreak() is called from a foreground process, and when
fildes refers to a non-controlling terminal, the tcsendbreak
actions shall be performed.
Posix Ref: Component TCSENDBREAK Assertion 7.2.2.2-X1(C)
Test Strategy:
OPEN and initialise terminal file and loop back file
CREATE process pair
PARENT process:
SLEEP for WAITTIME to allow break to generate SIGINT signal
VERIFY that SIGINT signal was received
CHILD process:
SET time out for WAITTIME
SEND a break using tcsendbreak(loop_fildes, 0)
VERIFY that tcsendbreak() returned zero.
Test Information:
tcsendbreak() action was not performed (SIGINT not received)
*********************************************************************
/tset/POSIX.os/devclass/tcsendbrea/T.tcsendbrea 10 Unresolved
Test Description:
If general terminal interface supported:
when tcsendbreak() 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 tcsendbreak actions shall be
performed.
Posix Ref: Component TCSENDBREAK Assertion 7.2.2.2-X2(C)
Test Information:
tcflush() failed on VSX_TERMIOS_LOOP - errno 5 (EIO)
*********************************************************************
/tset/POSIX.os/devclass/tcsendbrea/T.tcsendbrea 11 Unresolved
Test Description:
If general terminal interface supported:
when tcsendbreak() is called from a background process, that is
blocking the SIGTTOU signal, and when fildes refers to a non-
controlling terminal, the tcsendbreak actions shall be performed.
Posix Ref: Component TCSENDBREAK Assertion 7.2.2.2-X3(C)
Test Information:
tcflush() failed on VSX_TERMIOS_LOOP - errno 5 (EIO)
*********************************************************************
/tset/POSIX.os/devclass/tcsendbrea/T.tcsendbrea 12 Unresolved
Test Description:
If general terminal interface supported:
when tcsendbreak() is called from a background process, that is
ignoring the SIGTTOU signal, and when fildes refers to a non-
controlling terminal, the tcsendbreak actions shall be performed.
Posix Ref: Component TCSENDBREAK Assertion 7.2.2.2-X4(C)
Test Information:
tcflush() failed on VSX_TERMIOS_LOOP - errno 5 (EIO)
*********************************************************************Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
This request raises the question as to which processes may be affected
when the controlling terminal is disassociated from a session because
the session leader has exited. The XBD Page 114 states that once a
controlling process (session leader) terminates other processes in the
session may be denied subsequent access to the terminal. The XPG is
silent as to the ability of processes which are not in the session
which has terminated to access the terminal after session termination.
However, the write() system call does state that an EIO error may also
be returned under implementation-dependent conditions. This phrase is
not repeated for the tcsendbreak() call, though it is believed that this
is an unintentional omission.
The VSX test suite is well behaved on most systems which do not disassociate
processes outside of the session and relies on this association being
retained. The XPG is silent about this being a requirement and it could
be considered that the disassociation of processes outside the session
is a valid extension to the XPG specification.
On balance this seems to be a valid grey area and a permanent interpretation
is recommended. However, since this is an issue affected by the POSIX
specification, the X/Open K/RT working group may consider it advisable to
forward this request through the POSIX.1 interpretations forum.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Permanent Interpretation (PIN) Review Conclusion
A permanent interpretation is granted.
Problem Reporting System Options:
- View Report 0300
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority