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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1131 Actions


    Problem Report Number 1131
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0333
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Sockets (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.2
    Test Identification CAPIsockets/recv 27 28
    Problem Summary PG4U.00139 This request maintains the tests fail because they are testing behavior on blocking reads.
    Problem Text
    This interpretation request is for the following sockets tests:

    recv 27, 28
    recvfrom 29, 30
    recvmsg 35, 36

    These tests fail because they fail to set O_NONBLOCK on the file
    descriptor as required by the XPG5 XNS spec. From page 151 (recv):

    "If no messages are available at the socket and O_NONBLOCK is not set
    on the socket's file descriptor, recv() blocks until a message arrives."

    Also these tests contain two instances of the following:

    t1 = (double)((double)tp1.tv_sec + ((double)tp1.tv_usec/1000));
    t2 = (double)((double)tp2.tv_sec + ((double)tp2.tv_usec/1000));
    t = (double)((double)5 + ((double)123/1000000));

    tp1.tv_usec and tp2.tv_usec should be divided by 1000000 as is the usec
    value in the t line.

    Similiarly for recfrom and recvmsg failures.
    Test Output
    TEST CASE: recv

    TEST PURPOSE #27
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVTIMEO option shall define the timeout value
    for a call to ssize_t recv(int socket, void *buffer,
    size_t length, int flags).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 2405
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 2405
    PREP: Call setsockopt to set timeout value
    TEST: Call to recv times out as set
    ERROR: recv did not timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 2405 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32883
    PREP: echo_server: read and echo data
    INFO: Server received signal 15
    INFO: Server terminated
    27 FAIL

    TEST PURPOSE #28
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVLOWAT option shall define the minimum number
    of bytes to process for a call to ssize_t recv(int
    socket, void *buffer, size_t length, int flags).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 2805
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 2805 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32884
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 6 bytes of data (ABC123)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 2805
    PREP: Call setsockopt to set timeout value
    PREP: Call setsockopt to set SO_RCVLOWAT to 8
    PREP: Send test data that is 6 bytes long
    TEST: Call to recv blocks and times out
    ERROR: recv did not block and timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    28 FAIL

    TEST CASE: recvfrom

    TEST PURPOSE #29
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVTIMEO option shall define the timeout value
    for a call to ssize_t recvfrom(int socket, void
    *buffer, size_t length, int flags, struct sockaddr
    *address, socklen_t *address_len).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 4361
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 4361 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32894
    PREP: echo_server: read and echo data
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 4361
    PREP: Call setsockopt to set timeout value
    TEST: Call to recvfrom times out as set
    ERROR: recvfrom did not timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    29 FAIL

    TEST PURPOSE #30
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVLOWAT option shall define the minimum number
    of bytes to process for a call to ssize_t
    recvfrom(int socket, void *buffer, size_t length, int
    flags, struct sockaddr *address, socklen_t
    *address_len).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 4761
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 4761 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32895
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 6 bytes of data (ABC123)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 4761
    PREP: Call setsockopt to set timeout value
    PREP: Call setsockopt to set SO_RCVLOWAT to 8
    PREP: Send test data that is 6 bytes long
    TEST: Call to recvfrom blocks and times out
    ERROR: recvfrom did not block and timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    30 FAIL

    TEST CASE: recvmsg

    TEST PURPOSE #35
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVTIMEO option shall define the timeout value
    for a call to ssize_t recvmsg(int socket, struct
    msghdr *message, int flags).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 2485
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 2485 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32905
    PREP: echo_server: read and echo data
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 2485
    PREP: Call setsockopt to set timeout value
    TEST: Call to recvmsg times out as set
    ERROR: recvmsg did not timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    35 FAIL

    TEST PURPOSE #36
    If the implementation supports a communications domain
    and a socket type and allows the option to be set:
    The SO_RCVLOWAT option shall define the minimum number
    of bytes to process for a call to ssize_t recvmsg(int
    socket, struct msghdr *message, int flags).
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 9.3.155.183, port = 2885
    PREP: Server: create socket
    PREP: Server: bind address 9.3.155.183, port 2885 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 9.3.155.183, port 32906
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 20 bytes of data (ABCDEFGHIJKLMNOPQ123)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 9.3.155.183, port 2885
    PREP: Call setsockopt to set timeout value
    PREP: Call setsockopt to set SO_RCVLOWAT to 23
    PREP: Send test data that is 6 bytes long
    TEST: Call to recvmsg blocks and times out
    ERROR: recvmsg did not block and timeout as expected
    ERROR: recv failed, errno = 78(ETIMEDOUT - Connection timed out)
    36 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    We recommend this request be refused.

    The submitter's main point here is that SO_RCVTIMEO and SO_RCVLOWAT
    fine tune the behavior of non-blocking calls. Although the spec could
    be clearer we believe the SO_RCVLOWAT wording on XSH5 page 169
    clearly indicates that they apply to blocking calls.

    It states

    ... If SO_RCVLOWAT is set to a larger value BLOCKING receive
    calls normailly wait until they have received the smaller of the
    low water mark or the requested amount. ...

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    This request should have a 14 day review by Xnet.

    Review Type Expert Group Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution No Resolution Given
    Review Conclusion
    The WG agrees with the consultant's recommendation.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Rejected (REJ)
    Review Conclusion
    This request is refused.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority