mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-14 05:16:25 -04:00
It was proved in GH #2875 that the regtest was broken, at least for the server-side abnsz, as the connect() was not performed using the proper family, which results in kernel refusing to perform the call, while the reg-test actually succeeds. Indeed, in the test we used vtest client to connect to haproxy, which then routed the request to another haproxy instance listening on an abnsz socket, and this last haproxy was the one to answer the http request. As we only used "rxresp" in vtest client, the test succeeded with empty responses, which was the case due to the server connection failing on the first haproxy process.
36 lines
868 B
Text
36 lines
868 B
Text
varnishtest "Abstract unix socket - zero terminated"
|
|
feature ignore_unknown_macro
|
|
feature cmd "command -v curl"
|
|
|
|
# abns@ sockets are not available on freebsd
|
|
#EXCLUDE_TARGETS=freebsd,osx,generic
|
|
#REGTEST_TYPE=devel
|
|
|
|
haproxy h1 -Ws -S -conf {
|
|
global
|
|
stats socket "${tmpdir}/h1/stats" level admin expose-fd listeners
|
|
|
|
defaults
|
|
mode http
|
|
timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout client "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
timeout server "${HAPROXY_TEST_TIMEOUT-5s}"
|
|
|
|
listen testme
|
|
bind "fd@${testme}"
|
|
server f2 abnsz@hap-f2
|
|
|
|
frontend f2
|
|
bind abnsz@hap-f2
|
|
http-request return status 200 content-type text/plain string "ok"
|
|
} -start
|
|
|
|
client c1 -connect ${h1_testme_sock} {
|
|
txreq -url "/"
|
|
rxresp
|
|
expect resp.status == 200
|
|
} -run
|
|
|
|
shell {
|
|
curl -sfS --abstract-unix-socket hap-f2 "http://host/" | grep "ok"
|
|
}
|