view tests/test-nonblocking-socket.sh @ 14590:e0d0a4052520

nonblocking: Add tests for sockets. * tests/test-nonblocking-socket.sh: New file. * tests/test-nonblocking-socket-main.c: New file. * tests/test-nonblocking-socket-child.c: New file. * tests/test-nonblocking-socket.h: New file. * tests/socket-server.h: New file. * tests/socket-client.h: New file. * modules/nonblocking-socket-tests: New file. * modules/nonblocking-tests (Depends-on): Add nonblocking-socket-tests.
author Bruno Haible <bruno@clisp.org>
date Sun, 17 Apr 2011 19:50:10 +0200
parents
children 8c1a17df67e0
line wrap: on
line source

#!/bin/sh

# Test blocking write() with blocking read().
./test-nonblocking-socket-main${EXEEXT} ./test-nonblocking-socket-child${EXEEXT} 0 || exit 1

# Test non-blocking write() with blocking read().
./test-nonblocking-socket-main${EXEEXT} ./test-nonblocking-socket-child${EXEEXT} 1 || exit 1

# Test blocking write() with non-blocking read().
./test-nonblocking-socket-main${EXEEXT} ./test-nonblocking-socket-child${EXEEXT} 2 || exit 1

# Test non-blocking write() with non-blocking read().
./test-nonblocking-socket-main${EXEEXT} ./test-nonblocking-socket-child${EXEEXT} 3 || exit 1