From: Willy Tarreau Date: Tue, 22 Sep 2026 22:16:40 +0000 (+0000) Subject: REGTESTS: http-messaging: give each frontend its own syslog server X-Git-Tag: v3.5-dev8~8 X-Git-Url: https://git.kaiwu.me/$%7BGITURL%7D$%7Bcid%7D?a=commitdiff_plain;h=da4fee6839e46b0020912dd101fd1abb3612d5bd;p=haproxy.git REGTESTS: http-messaging: give each frontend its own syslog server The two frontends of this test were logging to the same syslog server and their two messages were expected in order. A stream is logged when it ends, which may be after the next client has been served by the other frontend, so that order is not guaranteed. This is the same race which was caught in the raw hello test when the suite runs in parallel, found here by inspection rather than by a failure. --- diff --git a/reg-tests/http-messaging/http_no_delay.vtc b/reg-tests/http-messaging/http_no_delay.vtc index 2044c0fa5..89257ad20 100644 --- a/reg-tests/http-messaging/http_no_delay.vtc +++ b/reg-tests/http-messaging/http_no_delay.vtc @@ -41,10 +41,16 @@ server s2 { chunkedlen 0 } -start +# One syslog server per frontend: a stream is logged when it ends, which +# may be after the next client has been served by the other frontend, so +# the two messages are only ordered within their own server. syslog Slg -level info { # three digits: the incomplete message waited for the cork timeout recv expect ~ ": delayed tt=[0-9]{3,} " +} -start + +syslog Slg2 -level info { # one or two digits: it was pushed out immediately recv expect ~ ": nodelay tt=[0-9]{1,2} " @@ -57,22 +63,24 @@ haproxy h1 -conf { .endif chroot / log "${Slg_addr}:${Slg_port}" local0 info + log "${Slg2_addr}:${Slg2_port}" local0 info defaults mode http - log global timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" timeout client "${HAPROXY_TEST_TIMEOUT-5s}" timeout server "${HAPROXY_TEST_TIMEOUT-5s}" listen fe1 bind "fd@${fe1}" + log "${Slg_addr}:${Slg_port}" local0 info log-format "delayed tt=%Tt td=%Td" server s1 ${s1_addr}:${s1_port} listen fe2 bind "fd@${fe2}" option http-no-delay + log "${Slg2_addr}:${Slg2_port}" local0 info log-format "nodelay tt=%Tt td=%Td" server s2 ${s2_addr}:${s2_port} } -start @@ -98,3 +106,4 @@ client c2 -connect ${h1_fe2_sock} { } -run syslog Slg -wait +syslog Slg2 -wait