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

The Open Brand -- Problem Reporting and Interpretations System


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


Report 1173 Actions


    Problem Report Number 1173
    Submitter's Classification Test Suite problem
    State Resolved
    Resolution Rejected (REJ)
    Problem Resolution ID REJ.X.0375
    Raised 1970-01-01 08:00
    Updated 2003-03-13 08:00
    Published null
    Product Standard Internationalised System Calls and Libraries Extended (UNIX 95)
    Certification Program The Open Brand certification program
    Test Suite VSU version 4.1.0
    Test Identification Base/writeselect 14 2 13
    Problem Summary PG4U.00092 This request claims the AF_UNIX SOCK_DGRAM test part fails because the server fails to close a conection after the AF_UNIX SOCK_STREAM test part.
    Problem Text
    This test may fail because bind() faild with EADDRINUSE error
    on UNIX domain and streams type socket.

    The first test of UNIX domain and a socket type did not close
    the accepted fd, so the second test of UNIX domain and datagram type
    fail to bind to the same address as stream type socket.

    The change to the lib/capi_sock/unix.c module is as follows,

    *** unix.c
    --- unix.c.new
    ***************
    *** 598,603 ****
    --- 598,604 ----
    sleep_server(fd);

    close(fd);
    + close(s);
    } else {
    if (type == SOCK_DGRAM) {
    tet_infoline("PREP: Server: notify client server is ready");
    Test Output

    TEST CASE: write

    TEST PURPOSE #14
    If the implementation supports a communications domain
    and a socket type:
    A call to ssize_t write(int fildes, const void *buf,
    size_t nbyte) when fildes refers to a socket shall
    initiate transmission of a message from the specified
    socket to its peer.
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 4709
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 133.203.212.88, port 4709
    PREP: Zero receive buffer
    TEST: Write test data
    TEST: Return value
    TEST: Receive test data
    TEST: Compare data
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_STREAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a006M4
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 4709 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 133.203.212.88, port 1380
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Bind address ../tmp/uclient.a006M4 to socket
    PREP: Connect to address ../tmp/unix.a006M4
    PREP: Zero receive buffer
    TEST: Write test data
    TEST: Return value
    TEST: Receive test data
    TEST: Compare data
    CLEANUP: Close socket, kill server
    TEST: AF_INET SOCK_DGRAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 4710
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a006M4 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client ready to accept
    PREP: Server: accept connection
    INFO: Server: accepted connection from address ../tmp/uclient.a006M4
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)
    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)
    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)

    < last message repeated. >

    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)
    INFO: echo_server: echoed 11 bytes of data (ABC123TEST!)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 133.203.212.88, port 4710
    PREP: Zero receive buffer
    TEST: Write test data
    TEST: Return value
    TEST: Receive test data
    TEST: Compare data
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_DGRAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a006M4
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 4710 to socket
    PREP: Server: notify client server is ready
    PREP: Server: read and echo data
    INFO: Server: echoed 11 bytes of data (ABC123TEST!), peer is 133.203.212.88, p
    ort 1259
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    ERROR: Timed out waiting for completion.
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a006M4 to socket
    ERROR: unix_server: bind to file ../tmp/unix.a006M4 failed, errno = 125(EADDRI
    NUSE - Address in use)
    INFO: Server terminated
    14 UNRESOLVED

    TEST CASE: select

    SPEC1170TESTSUITE CASE 2
    A call to int select(int nfds, fd_set *readfds, fd_set
    *writefds, fd_set *exceptfds, const struct timeval
    *timeout) when readfds is not a null pointer shall
    check each regular file, terminal, pseudo-terminal
    device, STREAMS-based file, sockets, FIFOs and pipes
    file descriptor less than nfds specified by a bit set
    in the structure pointed to by readfds and set the
    corresponding bit in the structure pointed to by
    readfds when the file descriptor is ready to read.
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 3549
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 133.203.212.88, port 3549
    PREP: Write data into socket
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_STREAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a00186
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 3549 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 133.203.212.88, port 1451
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 10 bytes of data (write data)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect to address ../tmp/unix.a00186
    PREP: Write data into socket
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close socket, kill server
    TEST: AF_INET SOCK_DGRAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 3550
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a00186 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client ready to accept
    PREP: Server: accept connection
    INFO: Server: accepted connection from address
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 10 bytes of data (write data)
    INFO: echo_server: echoed 10 bytes of data (write data)

    < last message repeated. >

    INFO: echo_server: echoed 10 bytes of data (write data)
    INFO: echo_server: echoed 10 bytes of data (write 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 133.203.212.88, port 3550
    PREP: Write data into socket
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_DGRAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a00186
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 3550 to socket
    PREP: Server: notify client server is ready
    PREP: Server: read and echo data
    INFO: Server: echoed 10 bytes of data (write data), peer is 133.203.212.88, port 2063
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    ERROR: Timed out waiting for completion.
    PREP: Create pipe
    PREP: Write data into pipe
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close pipe
    PREP: Create fifo
    PREP: Write data into fifo
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Remove fifo
    PREP: Open pseudo ttys
    PREP: Write data into pty
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close pseudo terminal
    PREP: Create file
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close file
    PREP: Create a pipe
    PREP: Determine if pipe is a stream
    PREP: Write data into STREAM
    TEST: select checks readfds and sets appropriate bits
    CLEANUP: Close STREAM
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a00186 to socket
    ERROR: unix_server: bind to file ../tmp/unix.a00186 failed, errno = 125(EADDRINUSE - Address in use)
    INFO: Server terminated
    UNRESOLVED

    TEST PURPOSE #13
    A call to int select(int nfds, fd_set *readfds, fd_set
    *writefds, fd_set *exceptfds, const struct timeval
    *timeout) shall support regular files, terminals,
    pseudo-terminal devices, STREAMS-based files, sockets,
    FIFOS and pipes.
    TEST: AF_INET SOCK_STREAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 1485
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 133.203.212.88, port 1485
    TEST: select supports sockets
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_STREAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a005Al
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 1485 to socket
    PREP: Server: listen on socket
    PREP: Server: notify client server is ready
    PREP: Server: accept connection
    INFO: Server: accepted connection from address 133.203.212.88, port 1122
    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 to address ../tmp/unix.a005Al
    TEST: select supports AF_UNIX sockets
    CLEANUP: Close socket, kill server
    TEST: AF_INET SOCK_DGRAM
    PREP: Create test sockaddr_in: address = 133.203.212.88, port = 1486
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a005Al to socket
    PREP: Server: listen on socket
    PREP: Server: notify client ready to accept
    PREP: Server: accept connection
    INFO: Server: accepted connection from address
    PREP: echo_server: read and echo data
    INFO: echo_server: echoed 4224800 bytes of data ( <truncated to 256 bytes>)
    INFO: echo_server: echoed 4224800 bytes of data ( <truncated to 256 bytes>)

    < last message repeated. >

    INFO: echo_server: echoed 4224800 bytes of data ( <truncated to 256 bytes>)
    INFO: echo_server: echoed 4224800 bytes of data ( <truncated to 256 bytes>)
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    PREP: Create a socket
    PREP: Connect socket to address 133.203.212.88, port 1486
    TEST: select supports sockets
    CLEANUP: Close socket, kill server
    TEST: AF_UNIX SOCK_DGRAM
    PREP: Create test sockaddr_un: path = ../tmp/unix.a005Al
    PREP: Server: create socket
    PREP: Server: bind address 133.203.212.88, port 1486 to socket
    PREP: Server: notify client server is ready
    PREP: Server: read and echo data
    INFO: Server received signal 15
    INFO: Server terminated
    PREP: Wait for server to be ready
    ERROR: Timed out waiting for completion.
    PREP: Create pipe
    TEST: select supports pipes
    CLEANUP: Close pipe
    PREP: Create fifo
    TEST: select supports fifos
    CLEANUP: Remove fifo
    PREP: Open loopback ttys
    TEST: select supports terminals
    CLEANUP: Close terminals
    PREP: Open pseudo ttys
    TEST: select supports pseudo terminals
    CLEANUP: Close pseudo terminal
    PREP: Create file
    TEST: select supports regular files
    CLEANUP: Close file
    PREP: Create a pipe
    PREP: Determine if pipe is a stream
    TEST: select supports STREAMS
    CLEANUP: Close STREAM
    PREP: Server: create socket
    PREP: Server: bind address ../tmp/unix.a005Al to socket
    ERROR: unix_server: bind to file ../tmp/unix.a005Al failed, errno = 125(EADDRINUSE - Address in use)
    INFO: Server terminated
    13 UNRESOLVED

    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.

    Using write test 14 as an example...

    The AF_UNIX SOCK_STREAM part of the test forks a separate process
    to act as the server for its part of the test. All the fds associated
    with the server are a part of this separate process.

    When the AF_UNIX SOCK_STREAM part of the test is finished it
    sends a signal to the server process then waits for it to exit().
    The server recieves this signal and exit()s via the function named
    done(). We do not believe the portion of the code the submitter
    suggests changing should be executed.

    Since all the server fds are part of this server process we believe
    they should all be closed and the socket should be dismantled before
    the server process exits. So reusing the same socket address in the
    next part of the test should be ok.

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

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority