]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: add basic QMux tests quic-interop flx04/quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 1 Jun 2026 16:27:26 +0000 (18:27 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 2 Jun 2026 11:31:15 +0000 (13:31 +0200)
Write two simple QMux tests, for http/3 in SSL and clear.

reg-tests/qmux/certs [new symlink]
reg-tests/qmux/h3.vtc [new file with mode: 0644]
reg-tests/qmux/h3_clr.vtc [new file with mode: 0644]

diff --git a/reg-tests/qmux/certs b/reg-tests/qmux/certs
new file mode 120000 (symlink)
index 0000000..9b744ba
--- /dev/null
@@ -0,0 +1 @@
+../ssl/certs
\ No newline at end of file
diff --git a/reg-tests/qmux/h3.vtc b/reg-tests/qmux/h3.vtc
new file mode 100644 (file)
index 0000000..9182e58
--- /dev/null
@@ -0,0 +1,39 @@
+varnishtest "HTTP/3 over QMux"
+feature ignore_unknown_macro
+
+# TODO to adjust once QMux compilation is QUIC/SSL free
+feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL) && ssllib_name_startswith(OpenSSL) && openssl_version_atleast(1.1.1)'"
+
+haproxy h1 -conf {
+       global
+       .if feature(THREAD)
+               thread-groups 1
+       .endif
+       expose-experimental-directives
+       ssl-server-verify none
+
+       defaults
+               mode http
+               timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
+               timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
+               timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
+
+       frontend fterm
+               bind "fd@${fterm}" ssl crt ${testdir}/certs/common.pem alpn h3
+        http-request return status 200 hdr x-alpn %[ssl_fc_alpn] hdr x-ver %[req.ver]
+
+       frontend fpub
+               bind "fd@${fpub}" proto h1
+               use_backend be
+
+       backend be
+               server hap ${h1_fterm_addr}:${h1_fterm_port} ssl alpn h3
+} -start
+
+client c1 -connect ${h1_fpub_sock} {
+       txreq
+       rxresp
+       expect resp.status == 200
+       expect resp.http.x-alpn == "h3"
+       expect resp.http.x-ver == "3.0"
+} -run
diff --git a/reg-tests/qmux/h3_clr.vtc b/reg-tests/qmux/h3_clr.vtc
new file mode 100644 (file)
index 0000000..364e180
--- /dev/null
@@ -0,0 +1,38 @@
+varnishtest "HTTP/3 over clear QMux"
+feature ignore_unknown_macro
+
+# TODO to adjust once QMux compilation is QUIC/SSL free
+feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && !feature(QUIC_OPENSSL_COMPAT) && !feature(OPENSSL_WOLFSSL) && ssllib_name_startswith(OpenSSL) && openssl_version_atleast(1.1.1)'"
+feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(3.4-dev14)'"
+
+haproxy h1 -conf {
+       global
+       .if feature(THREAD)
+               thread-groups 1
+       .endif
+       expose-experimental-directives
+
+       defaults
+               mode http
+               timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
+               timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
+               timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
+
+       frontend fterm
+               bind "fd@${fterm}" proto qmux
+        http-request return status 200 hdr x-ver %[req.ver]
+
+       frontend fpub
+               bind "fd@${fpub}" proto h1
+               use_backend be
+
+       backend be
+               server hap ${h1_fterm_addr}:${h1_fterm_port} proto qmux
+} -start
+
+client c1 -connect ${h1_fpub_sock} {
+       txreq
+       rxresp
+       expect resp.status == 200
+       expect resp.http.x-ver == "3.0"
+} -run