]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: use two haproxy instances to distinguish the QUIC traces
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 8 Jul 2025 17:47:39 +0000 (19:47 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 9 Jul 2025 14:01:02 +0000 (16:01 +0200)
The aim of this patch is to identify the QUIC traces between the QUIC frontend
and backend parts. Two haproxy instances are created. The c(1|2) http clients
connect to ha1 with TCP frontends and QUIC backends. ha2 embeds two QUIC listeners
with s1 as TCP backend. When the traces are activated, they are dumped to stderr.
Hopefully, they are prefixed by the haproxy instance name (h1 or h2). This is very
useful to identify the QUIC instances.

reg-tests/quic/retry.vtc

index 120092f3d2e698d981b45f994be967f6857429b5..0a2a3954a1d897424aa86a2e4d48ff7367efcc4a 100644 (file)
@@ -10,20 +10,17 @@ server s1 {
     txresp
 } -repeat 2 -start
 
-haproxy h1 -conf {
+haproxy ha2 -conf {
     global
         expose-experimental-directives
         .if feature(THREAD)
             thread-groups 1
         .endif
 
-    # Uncomment these lines to get some debug traces
-    # ring buf1
-    #    size 1048576
-    #    format timed
-    #    backing-file ${tmpdir}/quic.traces
+    # Uncomment these lines to get some debug traces on stderr
     # traces
-    #    trace quic sink buf1 level developer start now
+    #    trace quic sink stderr level developer start now
+    #    trace ssl sink stderr level developer verbosity complete start now
 
     defaults
         mode http
@@ -38,12 +35,31 @@ haproxy h1 -conf {
     listen quic_lstnr_retry
         bind "quic+fd@${fe_quic_retry}" ssl crt ${testdir}/common.pem quic-force-retry
         server srv ${s1_addr}:${s1_port}
+} -start
+
+haproxy ha1 -conf {
+    global
+        expose-experimental-directives
+        .if feature(THREAD)
+            thread-groups 1
+        .endif
+
+    # Uncomment these lines to get some debug traces on stderr
+    # traces
+    #    trace quic sink stderr level developer start now
+    #    trace ssl sink stderr level developer verbosity complete start now
+
+    defaults
+        mode http
+        timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
+        timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
+        timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
 
     backend quic_be
-        server quic quic4@${h1_fe_quic_addr}:${h1_fe_quic_port} ssl verify none
+        server quic quic4@${ha2_fe_quic_addr}:${ha2_fe_quic_port} ssl verify none
 
     backend quic_be_retry
-        server quic_retry quic4@${h1_fe_quic_retry_addr}:${h1_fe_quic_retry_port} ssl verify none
+        server quic_retry quic4@${ha2_fe_quic_retry_addr}:${ha2_fe_quic_retry_port} ssl verify none
 
     frontend fe_wo_retry
         bind "fd@${fe}"
@@ -54,13 +70,13 @@ haproxy h1 -conf {
         use_backend quic_be_retry
 } -start
 
-client c1 -connect ${h1_fe_sock} {
+client c1 -connect ${ha1_fe_sock} {
     txreq
     rxresp
     expect resp.status == 200
 } -run
 
-client c2 -connect ${h1_fe_retry_sock} {
+client c2 -connect ${ha1_fe_retry_sock} {
     txreq
     rxresp
     expect resp.status == 200