From: Willy Tarreau Date: Fri, 20 Aug 2021 09:02:28 +0000 (+0200) Subject: REGTESTS: http_upgrade: fix incorrect expectation on TCP->H1->H2 X-Git-Tag: v2.5-dev5~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab4fa24cd832bfd22b06c0dd49db8dfee3b69cc4;p=thirdparty%2Fhaproxy.git REGTESTS: http_upgrade: fix incorrect expectation on TCP->H1->H2 Commit e1b9e1bb1 ("REGTESTS: Add script to tests TCP to HTTP upgrades") included a mistake in the TCP->H1->H2 test, it expected a close while it ought to expect a 400 bad req, which is what the mux returns in this case. It happens that this used to work fine with older versions of vtest which see the close regardless of the 400, but since Vtest commit 8d6c6bd ("Leak-plugging on barriers"), this doesn't work anymore. Let's fix this by expecting the proper response. This should be backported where this regtest is present, but only after verifying that it still works; indeed at the time of writing it's uncertain whether an earlier version used to immediately close. --- diff --git a/reg-tests/connection/tcp_to_http_upgrade.vtc b/reg-tests/connection/tcp_to_http_upgrade.vtc index 6791099798..093ba48e13 100644 --- a/reg-tests/connection/tcp_to_http_upgrade.vtc +++ b/reg-tests/connection/tcp_to_http_upgrade.vtc @@ -144,7 +144,8 @@ client c_err1 -connect ${h1_err1h1_sock} { # TCP > H1 > H2 upgrade not allowed client c_err2 -connect ${h1_err2h1_sock} { send "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" - expect_close + rxresp + expect resp.status == 400 } -run