-
Notifications
You must be signed in to change notification settings - Fork 14
/
test_all
executable file
·41 lines (31 loc) · 781 Bytes
/
test_all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
T="./test_socket99"
PORT=${PORT:-8080}
echo "Checking TCP client and server..."
$T tcp_server ${PORT} &
LAST=$!
sleep 0.1
$T tcp_client ${PORT} || kill ${LAST}
echo "Checking TCP client and server... (nonblocking)"
$T tcp_server_nonblocking ${PORT} &
LAST=$!
sleep 0.1
$T tcp_client_nonblocking ${PORT} || kill ${LAST}
echo
echo "Checking UDP client and server..."
$T udp_server ${PORT} &
LAST=$!
sleep 0.1
$T udp_client ${PORT} || kill ${LAST}
echo
echo "Checking Unix domain sockets (stream-based)..."
$T unix_server_stream ${PORT} &
LAST=$!
sleep 0.1
$T unix_client_stream ${PORT} || kill ${LAST}
echo
echo "Checking Unix domain sockets (datagram-based)..."
$T unix_server_datagram ${PORT} &
LAST=$!
sleep 0.1
$T unix_client_datagram ${PORT} || kill ${LAST}