integrationtest.selectlistener.main

Test-suite for UnixSockets.

The tests involve unix sockets and forking processes.

FLAKY: the unittests in this module are very flaky, as they rely on making various system calls (fork(), waitpid(), epoll_wait(), epoll_ctl(), etc) which could, under certain environmental conditions, fail.

Members

Functions

main
int main()
Undocumented in source. Be warned that the author may not have intended to support it.
run_client
int run_client(istring socket_path)

Opens a client connection and issues a request. The reply must be exactly what was sent.

run_test
void run_test(istring socket_path)

Makes a test. Starts the client in its own process, then starts the server in the current process and waits for them to finish. The client sends a message, gets an answer, compares the two strings and exits. The server opens the socket, accepts one request, reads the message, replies with the same message and exits (no more requests are handled).

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).