]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 19 Dec 2024 13:21:35 +0000 (14:21 +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.

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 817820ae17a00ab361eb609571962a7840bd51ee..c14d5ca07ec4c307f0c0ee581acb235546511a1f 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 5cfdf1a7e6c2e9f94b4ab2d653476ba04ad7b943..b5d56fff8cea08b9745ecf195ba3144eb1eeef5b 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 7bed3fd8e547d6297f2d694557590f636bbdb6ab..db1a3a9bbf9469318d970c2f579cd1b4224b0f8f 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 0a846af5951548a5d728924a61d49b7f9d65cd9e..e6016259c3cd4ec42de9f911448181c5198dee0b 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 11c7d629ba83eaca270205f62a26ecaa35b8a535..05a5d4aeeb0c7d2de06a316d09e66469671c86f6 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 bf53b5281775a4a1044bbdb9d05f18857ac893a6..5ca695305a97fdec5cab676da3d9d3efa4b7b9b1 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 3d0cd1572789005e70e75e42878e1db6d8887a6c..ba8eed09377b781fcc50cf878247c312c91bc8f2 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 51b5dfc5125b3dedd0ef0b88deb057cdc41e92b5..95a854a146e6c91e658afe64dc89dbcc98ce86e7 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 3cf79bdfb1535726c41ec2a872c14b1ecc958246..c4af594fc7fa2bde56170b48622104a2474f498f 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 e370d098fcc339e6aad1804dd896b141203c557d..f107e7fd55fff233bbc019acf380bbee47f25ec2 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 995d42624dbe1747d24a8e11ff5d09abf1eb2ce1..c28d45ef90a3641b71330beb40e853137581ddf9 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 208d350f6fd28964cb6823812585fc1c3cbcdacc..20f4ccb6c88a90a26c1f98346d99f6c11d8a277a 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