From 4ad6ee94ab6d4b0d9d51065c8e9078ca018d4d1f Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 21 Feb 2023 11:24:04 +0100 Subject: [PATCH] REGTESTS: Fix ssl_errors.vtc script to wait for connections close In this scripts, several clients perform a requests and exit because an SSL error is expected and thus no response is sent. However, we must explicitly wait for the connection close, via an "expect_close" statement. Otherwise, depending on the timing, HAProxy may detect the client abort before any connection attempt on the server side and no SSL error is reported, making the script to fail. --- reg-tests/ssl/ssl_errors.vtc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/reg-tests/ssl/ssl_errors.vtc b/reg-tests/ssl/ssl_errors.vtc index 45a22c153..8fb9c5a12 100644 --- a/reg-tests/ssl/ssl_errors.vtc +++ b/reg-tests/ssl/ssl_errors.vtc @@ -327,14 +327,17 @@ shell { client c4 -connect ${h1_clearlst_sock} { txreq + expect_close } -run client c5 -connect ${h1_clearlst_sock} { txreq + expect_close } -run client c6 -connect ${h1_clearlst_sock} { txreq + expect_close } -run barrier b1 sync @@ -355,14 +358,17 @@ shell { client c7 -connect ${h1_clearlst_sock} { txreq + expect_close } -run client c8 -connect ${h1_clearlst_sock} { txreq + expect_close } -run client c9 -connect ${h1_clearlst_sock} { txreq + expect_close } -run barrier b1 sync @@ -377,12 +383,15 @@ shell { # "No shared cipher" errors client c10 -connect ${h1_wrongcipherslst_sock} { txreq + expect_close } -run client c11 -connect ${h1_wrongcipherslst_sock} { txreq + expect_close } -run client c12 -connect ${h1_wrongcipherslst_sock} { txreq + expect_close } -run @@ -399,22 +408,27 @@ client c13 -connect ${h1_backenderrorslst_sock} { barrier b2 sync client c14 -connect ${h1_backenderrorslst_sock} { txreq + expect_close } -run barrier b2 sync client c15 -connect ${h1_backenderrorslst_sock} { txreq + expect_close } -run barrier b2 sync client c16 -connect ${h1_backenderrorslst_sock} { txreq + expect_close } -run barrier b2 sync client c17 -connect ${h1_backenderrorslst_sock} { txreq + expect_close } -run barrier b2 sync client c18 -connect ${h1_backenderrorslst_sock} { txreq + expect_close } -run syslog Slg_cust_fmt -wait