HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 0242 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 0242.


Report 0242 Actions


    Problem Report Number 0242
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Test Suite Deficiency (TSD)
    Problem Resolution ID TSD.X.0242
    Raised 1995-09-20 08:00
    Updated 2003-03-13 08:00
    Published 1995-10-23 08:00
    Product Standard Internationalised System Calls and Libraries (XPG4)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.3.5
    Test Identification POSIX.os/devclass/tcdrain 1, 2, 3, 4
    Problem Summary TSD4.242 These failures are all because of an error in function checkit() of tcdrain.c that makes tests calling do_tcdrain() susceptible to a timing problem. The problem is in the following piece of code: for ...
    Problem Text
    These failures are all because of an error in function checkit() of
    tcdrain.c that makes tests calling do_tcdrain() susceptible to a timing
    problem. The problem is in the following piece of code:

    for (i = 0; i < buflen; i += nbytes)
    {
    if (i==0)
    PATH_TRACE;
    nbytes = read( (use_tty?loop_fildes:tty_fildes),
    inbuf + i, buflen);
    if (nbytes < 0)
    break;
    }

    The error is that pathok can be incremented more than once if read()
    returns 0. This is possible because these tests set use_tty to TRUE
    and therefore the read()s are performed on the loopback slave. The
    loopback slave is initialized in function loop_init() of
    SRC/common/tsetlib/termios.c with ICANON turned off, VMIN set to 0,
    and VTIME set to 10. With these termios attributes, the first read()
    will return 0 if there is no data on the input queue and one second has
    passed since the read() was issued.

    We have recreated the error with debugging data and see the PATH_TRACE
    statement inside the loop executed more than once. The obvious
    conclusion is that the first read() return 0 and the loop control
    variable (i) is not changed. The failures are:

    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 1 Unresolved
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 2 UNREPORTED
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 3 Unresolved
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 4 Unresolved

    The result of test 2 is UNREPORTED because the code does not properly
    handle the failure:

    ret = cppair(ch_t2, NULLFN, 3 * WAITTIME, NOK|PATH_OK);

    if (ret != PATH_OK ) {
    testfail++;
    in_rpt("when TOSTOP flag was clear");
    } else
    PATH_TRACE;

    Since testfail is > 0, the "PATH_XS_RPT(7)" call at the end of test2()
    is not executed and a failure is not properly recorded.

    The code in checkit() should be changed so it is impossible for the
    PATH_TRACE statement to be executed more than once. test2() should
    also be fixed so that it reports on errors in a better manner.
    Test Output
    ************************************************************************
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 1 Unresolved

    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 Information:
    path tracing error: path counter 2, expected 3
    ************************************************************************
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 2 UNREPORTED

    Test Description:
    If general terminal interface supported:
    If _POSIX_JOB_CONTROL is implemented, when tcdrain() is called from
    a background process, that is not blocking or ignoring the SIGTTOU
    signal, a SIGTTOU signal shall be sent to the process group
    associated with the calling process and the tcdrain() actions shall
    not be performed.
    Posix Ref: Component TCDRAIN Assertion 7.2.2.2-05(C)

    Test Information:
    when TOSTOP flag was clear
    when TOSTOP flag was set
    ************************************************************************
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 3 Unresolved

    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 Information:
    path tracing error: path counter 4, expected 5
    ************************************************************************
    /tset/POSIX.os/devclass/tcdrain/T.tcdrain 4 Unresolved

    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 Information:
    path tracing error: path counter 3, expected 4
    ************************************************************************

    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 a fault in the test suite and it is recommended
    that a waiver be granted for this 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:

     

    Back   


Contact the Certification Authority