blob: 498e0c61a7218c836b2955796a4089584b791eb1 [file] [log] [blame]
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +02001# commit b4dd15b
2# BUG/MINOR: unix: Make sure we can transfer abns sockets on seamless reload.
3#
4# When checking if a socket we got from the parent is suitable for a listener,
5# we just checked that the path matched sockname.tmp, however this is
6# unsuitable for abns sockets, where we don't have to create a temporary
7# file and rename it later.
8# To detect that, check that the first character of the sun_path is 0 for
9# both, and if so, that &sun_path[1] is the same too.
10
11varnishtest "Seamless reload issue with abns sockets"
12feature ignore_unknown_macro
13
14haproxy h1 -W -conf {
15 global
16 stats socket ${tmpdir}/h1/stats level admin expose-fd listeners
17
18 defaults
19 mode http
20 log global
21 option httplog
22 timeout connect 15ms
23 timeout client 20ms
24 timeout server 20ms
25
26 listen testme
27 bind "fd@${testme}"
28 server test_abns_server abns@wpproc1 send-proxy-v2
29
30 frontend test_abns
31 bind abns@wpproc1 accept-proxy
32 http-request deny deny_status 200
33} -start
34
35shell {
36 kill -USR2 $(cat ${tmpdir}/h1/pid)
37}
38
39client c1 -connect ${h1_testme_sock} {
40 txreq -url "/"
41 rxresp
42} -repeat 50 -run
43