blob: b1f1aa5b1f83e5de1d24b5d7e3fdcaee74bdc8ac [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
Willy Tarreau084354f2019-04-25 08:50:25 +020017#EXCLUDE_TARGETS=freebsd,osx,generic
Frédéric Lécailledc1a3bd2019-03-29 15:07:24 +010018#REGTEST_TYPE=bug
PiBa-NLe6b11e12018-12-08 20:51:16 +010019
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020020haproxy h1 -W -conf {
21 global
Frédéric Lécaillea7029472018-12-20 09:55:44 +010022 stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020023
24 defaults
25 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010026 ${no-htx} option http-use-htx
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020027 log global
28 option httplog
29 timeout connect 15ms
30 timeout client 20ms
31 timeout server 20ms
32
33 listen testme
34 bind "fd@${testme}"
35 server test_abns_server abns@wpproc1 send-proxy-v2
36
37 frontend test_abns
38 bind abns@wpproc1 accept-proxy
39 http-request deny deny_status 200
40} -start
41
42shell {
Frédéric Lécaillea7029472018-12-20 09:55:44 +010043 kill -USR2 $(cat "${tmpdir}/h1/pid")
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020044}
45
46client c1 -connect ${h1_testme_sock} {
47 txreq -url "/"
48 rxresp
49} -repeat 50 -run
50