summaryrefslogtreecommitdiff
path: root/test/scripts/0000-Basic/0373
blob: 02cdc31fc8bc2e2964ce5bfce524ac9bf07f7f17 (plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# ${readsocket (Unix domain and IPv4)
need_ipv4
#
exim -be
1 >>${readsocket{DIR/test-socket}{QUERY-1\n}}<<
2 ${if exists{DIR/test-socket}\
  {>>${readsocket{DIR/test-socket}{QUERY-1\n}}<<}\
  {++ no socket ++}} 
****
#
# Note the difference between:
#   >*eof      => close the connection
#   *eof       => expect to read EOF from client
#
server DIR/test-socket 9
QUERY-1
>LF>ANSWER-1
>*eof
QUERY-2
>>ANSWER-2
>*eof
QUERY-3
>LF>ANSWER-3
>*eof
QUERY-4
>LF>ANSWER-4
>*eof
>>ANSWER-5
>*eof
*sleep 1
>*eof
>*eof
QUERY-8
*sleep 2
*eof
QUERY-9
*sleep 2
****
millisleep 500
exim -be
1 >>${readsocket{DIR/test-socket}{QUERY-1\n}}<<
2 >>${readsocket{DIR/test-socket}{QUERY-2\n}}<<
3 >>${readsocket{DIR/test-socket}{QUERY-3\n}{2s}{*EOL*}}<<
4 >>${readsocket{DIR/test-socket}{QUERY-4\n}{2s}{*EOL*}{sock error}}<<
5 >>${readsocket{DIR/test-socket}{}}<<
6 >>${readsocket{DIR/test-socket}{QUERY-6\n}}<<
7 >>${readsocket{DIR/test-socket}{QUERY-7\n}{1s}{}{sock error}}<<
8 >>${readsocket{DIR/test-socket}{QUERY-8\n}{1s}}<<
9 >>${readsocket{DIR/test-socket}{QUERY-9\n}{1s}{}{sock error}}<<
****
server DIR/test-socket
QUERY-ACL
*sleep 3
****
exim -odq -bs -oMa V4NET.0.0.0
quit
****
#
# Tests of IPv4 sockets
#
server PORT_S 11
QUERY-1
>LF>ANSWER-1
>*eof
QUERY-2
>>ANSWER-2
>*eof
QUERY-3
>LF>ANSWER-3
>*eof
QUERY-4
>LF>ANSWER-4
>*eof
>>ANSWER-5
>*eof
*sleep 1
>*eof
>*eof
QUERY-8
*sleep 2
*eof
QUERY-9
*sleep 2
*eof
QUERY-10
>LF>ANSWER-10
>*eof
>LF>ANSWER-11
>*eof
****
millisleep 500
exim -be
1 >>${readsocket{inet:thisloop:PORT_S}{QUERY-1\n}}<<
2 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-2\n}}<<
3 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-3\n}{2s}{*EOL*}}<<
4 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-4\n}{2s}{*EOL*}{sock error}}<<
5 >>${readsocket{inet:127.0.0.1:PORT_S}{}}<<
6 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-6\n}}<<
7 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-7\n}{1s}{}{sock error}}<<
8 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-8\n}{1s}}<<
9 >>${readsocket{inet:127.0.0.1:PORT_S}{QUERY-9\n}{1s}{}{sock error}}<<
10 >>${readsocket{inet:badloop:PORT_S}{QUERY-10\n}}<<
11 >>${readsocket{inet:thisloop:PORT_S}{QUERY-11\n}{2s:shutdown=no}}<<
****