From 15a19994df68cdf3b7e6a20e2ddb4437a6fb458a Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 15 Apr 2026 14:33:45 +0200 Subject: [PATCH] REGTESTS: add QUIC test for max-total streams setting Add a new QUIC regtest to test the new frontend stream.max-total setting. This test relies on two haproxy instances, as QUIC client and server. New setting stream.max-total is set to 3 on the server side. In total, 6 requests are performed, with a check to ensure that a new connection has been reopened for the last ones. --- reg-tests/quic/stream_max_total.vtc | 69 +++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 reg-tests/quic/stream_max_total.vtc diff --git a/reg-tests/quic/stream_max_total.vtc b/reg-tests/quic/stream_max_total.vtc new file mode 100644 index 000000000..1b7c1dd87 --- /dev/null +++ b/reg-tests/quic/stream_max_total.vtc @@ -0,0 +1,69 @@ +varnishtest "Test tune.quic.fe.stream_max_total setting" +feature ignore_unknown_macro + +# QUIC backend are not supported with USE_QUIC_OPENSSL_COMPAT +feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL)'" + +haproxy ha_qsrv -conf { + global + tune.quic.fe.stream.max-total 3 + + defaults + mode http + timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" + timeout client "${HAPROXY_TEST_TIMEOUT-5s}" + timeout server "${HAPROXY_TEST_TIMEOUT-5s}" + + listen li + bind "quic+fd@${fe_quic}" ssl crt ${testdir}/certs/common.pem + http-request return status 200 hdr x-id %[fs.id] +} -start + +haproxy ha_qcli -conf { + global + expose-experimental-directives + + defaults + mode http + timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" + timeout client "${HAPROXY_TEST_TIMEOUT-5s}" + timeout server "${HAPROXY_TEST_TIMEOUT-5s}" + + listen li + bind "fd@${fe}" + http-reuse always + server quic quic4@${ha_qsrv_fe_quic_addr}:${ha_qsrv_fe_quic_port} ssl verify none +} -start + +client c1 -connect ${ha_qcli_fe_sock} { + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 0 + + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 4 + + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 8 + + # max-stream reached, stream ID should be resetted + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 0 + + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 4 + + txreq + rxresp + expect resp.status == 200 + expect resp.http.x-id == 8 +} -run