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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 2390 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 2390.


Report 2390 Actions


    Problem Report Number 2390
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0656
    Raised 2004-06-05 03:31
    Updated 2004-06-09 14:13
    Published 2004-06-09 14:13
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.2.5
    Test Identification CAPI.os/ioprim/write 27
    CAPI.os/ioprim/writev 72
    Problem Summary write 27 and writev 72 do not give time for delivery of SIGPIPE
    Problem Text For both test cases, the code is written to expect the SIGPIPE signal
    immediately within the current thread.

    source file "tset/CAPI.os/ioprim/write/write27.c", at line 236:

    SET_ALARM(WAIT_FOR_TIME);
    ret = write(s, TestData, 5);
    IGNORE_ALARM;
    SET_ALARM(WAIT_FOR_TIME*4);
    ret = write(s, TestData, 5);
    pause(void); /* <-- new code */
    tet_infoline("TEST: SIGPIPE received");
    if (got_sig_pipe == 0) {
    sprintf((char *)&ebuf[0],
    "ERROR: Expect
    ed SIGPIPE signal, count of SIGPIPE signals = %d", got_sig_pipe);
    abortserver(TET_FAIL, pid);
    return;
    }
    CLEAR_ALARM;

    and in "tset/CAPI.os/ioprim/writev/writev72.c" at line 291:

    tet_infoline("TEST: Send on closed
    connection");
    SET_ALARM(WAIT_FOR_TIME);
    ret = writev(s,iov_out,iovnum);
    IGNORE_ALARM;
    SET_ALARM(WAIT_FOR_TIME*4);
    ret = writev(s,iov_out,iovnum);
    pause(void); /* <-- new code */
    tet_infoline("TEST: SIGPIPE received");
    if (got_sig_pipe == 0) {
    sprintf((char *)&ebuf[0],
    "ERROR: Expect
    ed SIGPIPE signal, count of SIGPIPE signals = %d", got_sig_pipe);
    abortserver(TET_FAIL, pid);
    return;
    }
    CLEAR_ALARM;

    The UNIX98 specification does not stipulate how the signal should be
    generated, only that it must be sent when the EPIPE error condition
    arises.

    [EPIPE]
    An attempt is made to write to a pipe or FIFO that is not open for
    reading by any process, or that only has one end open. A SIGPIPE
    signal will also be sent to the thread.

    In our implementation, the signal is generated asynchronously.
    By adding a pause in the code before checking for the signal, the tests
    pass.
    Test Output
    ****************************************************************************************************************
    /tset/CAPI.os/ioprim/write/T.write 27 Failed

    Test Description:
    Base Conditional Deviance
    If the implementation supports a communications domain and a
    stream-
    based socket type:
    EPIPE in errno, return -1, and a SIGPIPE signal is generated for
    the
    calling process on a call to ssize_t write(int fildes, const
    void
    *buf, size_t nbyte) when fildes refers to a socket of type
    SOCK_STREAM
    and the socket is no longer connected.

    Test Information:
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 192.29.78.67, port =
    1697
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 192.29.78.67, port 1697
    PREP: Tell server to close connection
    PREP: Wait for connection to close
    TEST: Send on closed connection
    TEST: SIGPIPE received
    ERROR: Expected SIGPIPE signal, count of SIGPIPE signals = 0
    CLEANUP: Send SIGTERM to server
    PREP: Server: create socket
    PREP: Server: bind address 192.29.78.67, port 1697 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 192.29.78.67,
    port 32873
    PREP: close_server: wait for client to be ready
    PREP: close_server: close connection
    PREP: close_server: tell client connection is closed
    INFO: Server terminated


    ****************************************************************************************************************


    ****************************************************************************************************************
    /tset/CAPI.os/ioprim/writev/T.writev 72 Failed

    Test Description:
    Base Conditional Deviance
    If the implementation supports a communications domain and a
    stream-
    based socket type:
    EPIPE in errno, return -1, and a SIGPIPE signal is generated for
    the
    calling process on a call to ssize_t writev(int fildes, const
    struct
    iovec *iov, int iovcnt) when fildes refers to a socket of type
    SOCK_STREAM and the socket is no longer connected.

    Test Information:
    PREP: Allocate and initialize I/O buffers
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 192.29.85.23, port =
    2561
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 192.29.85.23, port 2561
    PREP: Tell server to close connection
    PREP: Wait for connection to close
    TEST: Send on closed connection
    TEST: SIGPIPE received
    ERROR: Expected SIGPIPE signal, count of SIGPIPE signals = 0
    CLEANUP: Send SIGTERM to server
    PREP: Server: create socket
    PREP: Server: bind address 192.29.85.23, port 2561 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 192.29.85.23,
    port 32878
    PREP: close_server: wait for client to be ready
    PREP: close_server: close connection
    PREP: close_server: tell client connection is closed
    INFO: Server terminated


    ****************************************************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date 2004-06-05 03:31
    Last Updated 2004-06-07 18:05
    Completed 2004-06-07 18:05
    Status Complete
    Review Recommendation Rejected (REJ)
    Review Response The XSH5 sigaction() page states, under "Signal Generation and Delivery":

    "At the time of generation, a determination is made whether the signal
    has been generated for the process or for a specific thread within the
    process. Signals which are generated by some action attributable to a
    particular thread, such as a hardware fault, are generated for the
    thread that caused the signal to be generated. Signals that are
    generated in association with a process ID or process group ID or an
    asynchronous event such as terminal activity are generated for the process."

    The description of the EPIPE error on the write() page says that the
    SIGPIPE signal is "sent to the thread". Thus the specification requires
    that the signal is generated for the thread that called write(), not for
    the process. By generating the signal asynchronously (for the process)
    the implementation does not comply with this requirement.

    Review Type SA Review
    Start Date 2004-06-07 17:05
    Last Updated 2004-06-09 00:59
    Completed 2004-06-09 00:59
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion The SA concurs with the TSMA recommendation. The description of the
    EPIPE error on the write() page says that the SIGPIPE signal is "sent
    to the thread". Thus the specification requires that the signal is
    generated for the thread that called write(), not for the process. By
    generating the signal asynchronously (for the process) the
    implementation does not comply with this requirement.

    Thus this PR is rejected as a TSD.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority