]> git.kaiwu.me - haproxy.git/commit
REGTESTS: sample_fetches: add a test for the connection address fetches
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Sep 2026 20:20:43 +0000 (20:20 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 14:54:28 +0000 (16:54 +0200)
commita94107a9f31e3d6b25df8a3324df4814459c5bd3
tree903d0326526f737aadca76e37468fb616724159b
parentba5d9512bf4a01ea6609618c5faefe7656a9bb4b
REGTESTS: sample_fetches: add a test for the connection address fetches

None of the address fetches of the frontend and backend connections was
covered. This test checks src, src_port, src_is_local, dst, dst_port,
dst_is_local, dst_conn, their fc_* equivalents, so_id, so_name,
fc_http_major, fc_nb_streams, fc_rcvd_proxy, fc_err_name, and on the
backend side bc_src, bc_src_port, bc_dst, bc_dst_port, bc_http_major,
bc_nb_streams, bc_be_queue, bc_srv_queue and bc_err_name.

Everything runs over the loopback so that both endpoints are known: the
port of the frontend and the address and port of the server are compared
against the macros exported by vtest, and the src/fc_src and dst/fc_dst
pairs are compared against each other.

However the _local tests fail on macos, and this reveals some weakenesses
in the addr_is_local() function (error checking might be too broad) and
its caller (since that function may return -1 which is taken as a bool).
So for now the local tests are disabled.
reg-tests/sample_fetches/conn_addresses.vtc [new file with mode: 0644]