From: Christopher Faulet Date: Tue, 17 Nov 2026 07:04:04 +0000 (+0100) Subject: REGTESTS: http-messaging: Fix abortonclose issue with connect_tunnels X-Git-Tag: v3.5-dev13~56 X-Git-Url: https://git.kaiwu.me/http/%7B@url%7D?a=commitdiff_plain;h=914a06f19bf3894b15862208e74b865ce347fbd0;p=haproxy.git REGTESTS: http-messaging: Fix abortonclose issue with connect_tunnels connect_tunnels.vtc script was fixed. The third test could be aborted before the response was received if the connection to the server was not synchronous. It appeared to be an issue, at least, on macOS. This happened because C3 client was sending its tunneled data in a DATA frame carrying END_STREAM, right after the CONNECT request. Depending on the timing, the request could be aborted because "abortonclose" is now enabled by default. To fix the issue, the END_STREAM flag is no longer set on the client DATA frame. It is not mandatory for the test. In addition, Barriers are now used instead of delay to make the frame ordering deterministic. --- diff --git a/reg-tests/http-messaging/connect_tunnels.vtc b/reg-tests/http-messaging/connect_tunnels.vtc index 2ee98a8a8..3f67acf63 100644 --- a/reg-tests/http-messaging/connect_tunnels.vtc +++ b/reg-tests/http-messaging/connect_tunnels.vtc @@ -21,6 +21,7 @@ server s1 { expect req.method == "CONNECT" barrier b1 sync expect_close + barrier b1 sync } -start # H1 tunnel endpoint, data are exchanged in both directions @@ -34,14 +35,16 @@ server s2 { } -start # Same, for the H2 frontend. The reply is delayed to be sure the window update -# and the response headers are received first by the client. +# for the tunneled data and the response headers are received in this order by +# the client. Otherwise the window update may race with the response headers. server s3 { rxreq expect req.method == "CONNECT" + barrier b1 sync txresp -nolen recv 5 - delay 0.3 send "SRV->CLI" + barrier b1 sync } -start # H2 server refusing the CONNECT with a 403 carrying a payload and trailers. @@ -116,7 +119,7 @@ client c1 -connect ${hap_fe_tlr_sock} { txreq -noadd -litHdr inc plain "x-trailer" plain "1" } -run - delay 1 + barrier b1 sync } -run # H1 CONNECT, then tunneled data in both directions @@ -146,15 +149,16 @@ client c3 -connect ${hap_fe_h2_sock} { -litHdr inc plain ":method" plain "CONNECT" \ -litHdr inc plain ":authority" plain "${s3_addr}:${s3_port}" \ -nostrend - txdata -data "CLI>>" + txdata -data "CLI>>" -nostrend rxwinup + barrier b1 sync rxhdrs expect resp.status == 200 rxdata expect resp.body == "SRV->CLI" } -run - delay 1 + barrier b1 sync } -run # H2 CONNECT refused by the server with a payload and trailers. Both must be