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.
diff --git a/reg-tests/ssl/ssl_errors.vtc b/reg-tests/ssl/ssl_errors.vtc
index 45a22c1..8fb9c5a 100644
--- a/reg-tests/ssl/ssl_errors.vtc
+++ b/reg-tests/ssl/ssl_errors.vtc
@@ -327,14 +327,17 @@
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 @@
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 @@
# "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 @@
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