blob: 8f7acf64498532228b17cb338919939766fb3932 [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
PiBa-NLe6b11e12018-12-08 20:51:16 +010014# expose-fd is available starting at version 1.8
15#REQUIRE_VERSION=1.8
16# abns@ sockets are not available on freebsd
17#EXCLUDE_TARGETS=freebsd
18
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020019haproxy h1 -W -conf {
20 global
21 stats socket ${tmpdir}/h1/stats level admin expose-fd listeners
22
23 defaults
24 mode http
25 log global
26 option httplog
27 timeout connect 15ms
28 timeout client 20ms
29 timeout server 20ms
30
31 listen testme
32 bind "fd@${testme}"
33 server test_abns_server abns@wpproc1 send-proxy-v2
34
35 frontend test_abns
36 bind abns@wpproc1 accept-proxy
37 http-request deny deny_status 200
38} -start
39
40shell {
41 kill -USR2 $(cat ${tmpdir}/h1/pid)
42}
43
44client c1 -connect ${h1_testme_sock} {
45 txreq -url "/"
46 rxresp
47} -repeat 50 -run
48