From: William Lallemand Date: Wed, 27 May 2026 19:06:04 +0000 (+0200) Subject: REGTESTS: lua: fix tune.lua.openlibs in Lua reg-tests X-Git-Tag: v3.4.0~74 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2130c9ccfb70fd7a25fc5ff96ad77c1ccbcbb5f3;p=thirdparty%2Fhaproxy.git 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 --- 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