From 3013ec4f37fe0f794b2460898c250c2d81fa8ccf Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 27 May 2026 21:06:04 +0200 Subject: [PATCH] REGTESTS: lua: fix tune.lua.openlibs in Lua reg-tests 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 | 2 +- reg-tests/lua/lua_httpclient.vtc | 2 +- reg-tests/lua/lua_socket.vtc | 2 +- reg-tests/lua/txn_get_priv.vtc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reg-tests/lua/h_txn_get_priv.vtc b/reg-tests/lua/h_txn_get_priv.vtc index 1e948873e..798ead771 100644 --- a/reg-tests/lua/h_txn_get_priv.vtc +++ b/reg-tests/lua/h_txn_get_priv.vtc @@ -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 diff --git a/reg-tests/lua/lua_httpclient.vtc b/reg-tests/lua/lua_httpclient.vtc index bf7e5e4e9..a157a8df0 100644 --- a/reg-tests/lua/lua_httpclient.vtc +++ b/reg-tests/lua/lua_httpclient.vtc @@ -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 diff --git a/reg-tests/lua/lua_socket.vtc b/reg-tests/lua/lua_socket.vtc index 67094fcc4..6d715950f 100644 --- a/reg-tests/lua/lua_socket.vtc +++ b/reg-tests/lua/lua_socket.vtc @@ -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 diff --git a/reg-tests/lua/txn_get_priv.vtc b/reg-tests/lua/txn_get_priv.vtc index d9867f435..ef306ad42 100644 --- a/reg-tests/lua/txn_get_priv.vtc +++ b/reg-tests/lua/txn_get_priv.vtc @@ -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 -- 2.47.3