blob: 7387760d1dfb56f564dd3c82247d1bdd26491cb4 [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# abns@ sockets are not available on freebsd
Willy Tarreau084354f2019-04-25 08:50:25 +020015#EXCLUDE_TARGETS=freebsd,osx,generic
Frédéric Lécailledc1a3bd2019-03-29 15:07:24 +010016#REGTEST_TYPE=bug
PiBa-NLe6b11e12018-12-08 20:51:16 +010017
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020018haproxy h1 -W -conf {
19 global
Frédéric Lécaillea7029472018-12-20 09:55:44 +010020 stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020021
22 defaults
23 mode http
Christopher Faulet8f161482018-12-19 11:49:39 +010024 ${no-htx} option http-use-htx
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020025 log global
26 option httplog
Willy Tarreauce6fc252020-03-23 09:11:51 +010027 timeout connect 1s
28 timeout client 1s
29 timeout server 1s
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020030
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 {
Frédéric Lécaillea7029472018-12-20 09:55:44 +010041 kill -USR2 $(cat "${tmpdir}/h1/pid")
Frédéric Lécaille9b53b4c2018-06-20 07:26:44 +020042}
43
44client c1 -connect ${h1_testme_sock} {
45 txreq -url "/"
46 rxresp
47} -repeat 50 -run
48