From: Aurelien DARRAGON Date: Thu, 19 Dec 2024 13:16:27 +0000 (+0100) Subject: REGTESTS: fix lua-based regtests using tune.lua.smp-preserve-bool X-Git-Tag: v3.2-dev2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2838f5;p=thirdparty%2Fhaproxy.git REGTESTS: fix lua-based regtests using tune.lua.smp-preserve-bool Because of the previous commit, configs making use of lua script without setting "tune.lua.smp-preserve-bool" explicitly now raise a warning. However, since 6f746af91 ("REGTESTS: use -dW by default on every reg-tests"), regtests are not allowed to raise warnings anymore. Because of this the CI now fails for every tests that relies on Lua. To fix this, let's explicitly set the "tune.lua.smp-preserve-bool" for all tests involving Lua. Here we set the value to "on" because we know it is safe to do so, and this way it will be future-proof. If ec7443827 ("MINOR: hlua: add option to preserve bool type from smp to lua") is backported, then this patch must be backported with it (if it is not trivial to backport, then simply follow this rule: grep for "lua-load" in reg-tests directory, then for each match, make sure to set the tune.smp-preserve-bool tunable in the global section. --- diff --git a/reg-tests/compression/lua_validation.vtc b/reg-tests/compression/lua_validation.vtc index 817820ae17..c14d5ca07e 100644 --- a/reg-tests/compression/lua_validation.vtc +++ b/reg-tests/compression/lua_validation.vtc @@ -8,6 +8,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/lua_validation.lua defaults diff --git a/reg-tests/lua/bad_http_clt_req_duration.vtc b/reg-tests/lua/bad_http_clt_req_duration.vtc index 5cfdf1a7e6..b5d56fff8c 100644 --- a/reg-tests/lua/bad_http_clt_req_duration.vtc +++ b/reg-tests/lua/bad_http_clt_req_duration.vtc @@ -35,6 +35,7 @@ syslog Slog { haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/bad_http_clt_req_duration.lua defaults diff --git a/reg-tests/lua/close_wait_lf.vtc b/reg-tests/lua/close_wait_lf.vtc index 7bed3fd8e5..db1a3a9bbf 100644 --- a/reg-tests/lua/close_wait_lf.vtc +++ b/reg-tests/lua/close_wait_lf.vtc @@ -30,6 +30,7 @@ haproxy h1 -conf { timeout connect "${HAPROXY_TEST_TIMEOUT-5s}" global + tune.lua.smp-preserve-bool on lua-load ${testdir}/close_wait_lf.lua frontend frt diff --git a/reg-tests/lua/h_txn_get_priv.vtc b/reg-tests/lua/h_txn_get_priv.vtc index 0a846af595..e6016259c3 100644 --- a/reg-tests/lua/h_txn_get_priv.vtc +++ b/reg-tests/lua/h_txn_get_priv.vtc @@ -5,6 +5,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/h_txn_get_priv.lua defaults diff --git a/reg-tests/lua/httpclient_action.vtc b/reg-tests/lua/httpclient_action.vtc index 11c7d629ba..05a5d4aeeb 100644 --- a/reg-tests/lua/httpclient_action.vtc +++ b/reg-tests/lua/httpclient_action.vtc @@ -12,6 +12,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/httpclient_action.lua defaults mode tcp diff --git a/reg-tests/lua/lua_httpclient.vtc b/reg-tests/lua/lua_httpclient.vtc index bf53b52817..5ca695305a 100644 --- a/reg-tests/lua/lua_httpclient.vtc +++ b/reg-tests/lua/lua_httpclient.vtc @@ -38,6 +38,7 @@ server s3 { haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/lua_httpclient.lua defaults diff --git a/reg-tests/lua/lua_socket.vtc b/reg-tests/lua/lua_socket.vtc index 3d0cd15727..ba8eed0937 100644 --- a/reg-tests/lua/lua_socket.vtc +++ b/reg-tests/lua/lua_socket.vtc @@ -10,6 +10,7 @@ server s1 { haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/lua_socket.lua defaults diff --git a/reg-tests/lua/set_var.vtc b/reg-tests/lua/set_var.vtc index 51b5dfc512..95a854a146 100644 --- a/reg-tests/lua/set_var.vtc +++ b/reg-tests/lua/set_var.vtc @@ -11,6 +11,7 @@ haproxy h1 -conf { tune.idle-pool.shared off global + tune.lua.smp-preserve-bool on lua-load ${testdir}/set_var.lua defaults diff --git a/reg-tests/lua/txn_get_priv-thread.vtc b/reg-tests/lua/txn_get_priv-thread.vtc index 3cf79bdfb1..c4af594fc7 100644 --- a/reg-tests/lua/txn_get_priv-thread.vtc +++ b/reg-tests/lua/txn_get_priv-thread.vtc @@ -12,6 +12,8 @@ haproxy h1 -conf { # under us. tune.idle-pool.shared off + tune.lua.smp-preserve-bool on + lua-load-per-thread ${testdir}/txn_get_priv.lua lua-load-per-thread ${testdir}/txn_get_priv-print_r.lua diff --git a/reg-tests/lua/txn_get_priv.vtc b/reg-tests/lua/txn_get_priv.vtc index e370d098fc..f107e7fd55 100644 --- a/reg-tests/lua/txn_get_priv.vtc +++ b/reg-tests/lua/txn_get_priv.vtc @@ -6,6 +6,7 @@ feature ignore_unknown_macro haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/txn_get_priv.lua lua-load ${testdir}/txn_get_priv-print_r.lua diff --git a/reg-tests/lua/wrong_types_usage.vtc b/reg-tests/lua/wrong_types_usage.vtc index 995d42624d..c28d45ef90 100644 --- a/reg-tests/lua/wrong_types_usage.vtc +++ b/reg-tests/lua/wrong_types_usage.vtc @@ -43,6 +43,7 @@ server s1 -repeat 2 { haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/wrong_types_usage.lua defaults diff --git a/reg-tests/mailers/healthcheckmail.vtc b/reg-tests/mailers/healthcheckmail.vtc index 208d350f6f..20f4ccb6c8 100644 --- a/reg-tests/mailers/healthcheckmail.vtc +++ b/reg-tests/mailers/healthcheckmail.vtc @@ -12,6 +12,7 @@ syslog S1 -level notice { haproxy h1 -conf { global + tune.lua.smp-preserve-bool on lua-load ${testdir}/mailers.lua lua-load ${testdir}/healthcheckmail.lua