]> git.kaiwu.me - haproxy.git/commitdiff
REGTESTS: converter: serve the two sha2 requests on one connection
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Sep 2026 22:50:12 +0000 (22:50 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 30 Sep 2026 15:25:37 +0000 (17:25 +0200)
The final validation campaign caught this test with "HTTP header is
incomplete" when the whole suite runs with "--j 32" on a loaded
machine. Its client sends its two requests over a single connection
while the server answers each of them in its own iteration, so it
closes after the first response, exactly when the second request is
sent over the connection haproxy reuses, and the client gets that close
instead of a response.

This is the same shape which was fixed in the transaction state test:
the server now keeps its connection for both requests. Twenty runs in
parallel with the machine loaded pass.

reg-tests/converter/sha2.vtc

index da7557f75428175ed3533f90a2dab86df12253ef..954aa59444bb5dcf5a6548fb22fb44f65bdf4409 100644 (file)
@@ -4,16 +4,25 @@ feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL)'"
 
 feature ignore_unknown_macro
 
+# Both requests of the client below travel on the same connection, so
+# the server keeps its own connection open for the two of them. Serving
+# them in two iterations would close it after the first response, right
+# when the second request is sent over the connection haproxy reuses,
+# and the client would get a close instead of a response.
 server s1 {
        rxreq
        txresp
-} -repeat 2 -start
+
+       rxreq
+       txresp
+} -start
 
 haproxy h1 -conf {
     global
     .if feature(THREAD)
         thread-groups 1
     .endif
+        chroot /
 
     defaults
        mode http