]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: lua: fix tune.lua.openlibs in Lua reg-tests
authorWilliam Lallemand <wlallemand@irq6.net>
Wed, 27 May 2026 19:06:04 +0000 (21:06 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 28 May 2026 09:36:02 +0000 (11:36 +0200)
These tests were using "tune.lua.openlibs none" with lua-load, which
was a no-op in the old code since Lua states 0 and 1 were always
initialised before config parsing with all standard libraries.

Now that the Lua VM is initialised lazily, the restriction correctly
applies to state 0 as well. Replace "none" with the minimal set of
libraries actually required by each test's Lua code:

  - lua_socket.vtc, h_txn_get_priv.vtc, lua_httpclient.vtc: string
  - txn_get_priv.vtc: string,table

reg-tests/lua/h_txn_get_priv.vtc
reg-tests/lua/lua_httpclient.vtc
reg-tests/lua/lua_socket.vtc
reg-tests/lua/txn_get_priv.vtc

index 1e948873e8811041aa7b46db1f1804b7050cf20f..798ead7710ae219dc6f039ae6b5f3eac6c78bd49 100644 (file)
@@ -9,7 +9,7 @@ haproxy h1 -conf {
         thread-groups 1
     .endif
 
-        tune.lua.openlibs none
+        tune.lua.openlibs string
         tune.lua.bool-sample-conversion normal
         lua-load ${testdir}/h_txn_get_priv.lua
 
index bf7e5e4e9957be8a092758441ced8ba62d6dbaf5..a157a8df0fc20392b8f528cf12c51c1de367d411 100644 (file)
@@ -42,7 +42,7 @@ haproxy h1 -conf {
         thread-groups 1
     .endif
 
-        tune.lua.openlibs none
+        tune.lua.openlibs string
         tune.lua.bool-sample-conversion normal
         lua-load ${testdir}/lua_httpclient.lua
 
index 67094fcc49dc6417116697b45b56b581b1d37673..6d715950fc5c9575618afe1c158afd3d195c505e 100644 (file)
@@ -14,7 +14,7 @@ haproxy h1 -conf {
         thread-groups 1
     .endif
 
-        tune.lua.openlibs none
+        tune.lua.openlibs string
         tune.lua.bool-sample-conversion normal
         lua-load ${testdir}/lua_socket.lua
 
index d9867f4350030b04f6cf0434e676216207b5258e..ef306ad42d2a4bc7d3047e5b000bdfbad7ada192 100644 (file)
@@ -10,7 +10,7 @@ haproxy h1 -conf {
         thread-groups 1
     .endif
 
-        tune.lua.openlibs none
+        tune.lua.openlibs string,table
         tune.lua.bool-sample-conversion normal
         lua-load ${testdir}/txn_get_priv.lua
         lua-load ${testdir}/txn_get_priv-print_r.lua