REGTESTS: fix lua-based regtests using tune.lua.smp-preserve-bool
authorAurelien DARRAGON <adarragon@haproxy.com>
Thu, 19 Dec 2024 13:16:27 +0000 (14:16 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 6 Jan 2025 10:26:37 +0000 (11:26 +0100)
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.

(cherry picked from commit f2838f5172f163842c8b4d1bd2f55c9138e84573)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

12 files changed:
reg-tests/compression/lua_validation.vtc
reg-tests/lua/bad_http_clt_req_duration.vtc
reg-tests/lua/close_wait_lf.vtc
reg-tests/lua/h_txn_get_priv.vtc
reg-tests/lua/httpclient_action.vtc
reg-tests/lua/lua_httpclient.vtc
reg-tests/lua/lua_socket.vtc
reg-tests/lua/set_var.vtc
reg-tests/lua/txn_get_priv-thread.vtc
reg-tests/lua/txn_get_priv.vtc
reg-tests/lua/wrong_types_usage.vtc
reg-tests/mailers/healthcheckmail.vtc

index 817820a..c14d5ca 100644 (file)
@@ -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
index 5cfdf1a..b5d56ff 100644 (file)
@@ -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
index 7bed3fd..db1a3a9 100644 (file)
@@ -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
index 0a846af..e601625 100644 (file)
@@ -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
index 11c7d62..05a5d4a 100644 (file)
@@ -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
index bf53b52..5ca6953 100644 (file)
@@ -38,6 +38,7 @@ server s3 {
 
 haproxy h1 -conf {
     global
+        tune.lua.smp-preserve-bool on
         lua-load ${testdir}/lua_httpclient.lua
 
     defaults
index 3d0cd15..ba8eed0 100644 (file)
@@ -10,6 +10,7 @@ server s1 {
 
 haproxy h1 -conf {
     global
+        tune.lua.smp-preserve-bool on
         lua-load ${testdir}/lua_socket.lua
 
     defaults
index 51b5dfc..95a854a 100644 (file)
@@ -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
index 3cf79bd..c4af594 100644 (file)
@@ -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
 
index e370d09..f107e7f 100644 (file)
@@ -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
 
index 995d426..c28d45e 100644 (file)
@@ -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
index 208d350..20f4ccb 100644 (file)
@@ -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