lua: support luzer-based testing#14610
Conversation
|
ligurio is either the primary contact or is in the CCs list of projects/lua. |
6bca742 to
648bcfa
Compare
Sometimes one need to compile a luzer module with a non-system Lua library and headers, for which the LUA_LIBRARIES and LUA_INCLUDE_DIR CMake options are used. The patch adds variables for the rockspec to set these options via environment variables: LUA_LIBRARIES and LUA_INCLUDE_DIR. Needed for google/oss-fuzz#14610
648bcfa to
b14c354
Compare
The patch itnroduces a CMake option ENABLE_LIBFUZZER_STATIC_LINKAGE that enables static linkage wituh libFuzzer. By default linkage is disabled. Needed for google/oss-fuzz#14610
5b5ddaa to
ff72ffc
Compare
Sometimes one need to compile a luzer module with a non-system Lua library and headers, for which the LUA_LIBRARIES and LUA_INCLUDE_DIR CMake options are used. The patch adds variables for the rockspec to set these options via environment variables: LUA_LIBRARIES and LUA_INCLUDE_DIR. Needed for google/oss-fuzz#14610
48eff90 to
5aca8b2
Compare
Sometimes one need to build a luzer module using rockspec with a non-system Lua library and headers, for which the CMake options LUA_LIBRARIES and LUA_INCLUDE_DIR are used. The patch adds variables for the rockspec to set these options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT and LUAJIT_FRIENDLY_MODE. luarocks install --lua-version 5.1 --verbose --tree=lua_modules \ luzer-scm-1.rockspec ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers, for which the CMake options LUA_LIBRARIES and LUA_INCLUDE_DIR are used. The patch adds variables for the rockspec to set these options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT and LUAJIT_FRIENDLY_MODE. luarocks install --lua-version 5.1 --verbose --tree=lua_modules \ luzer-scm-1.rockspec ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers, for which the CMake options LUA_LIBRARIES and LUA_INCLUDE_DIR are used. The patch adds variables for the rockspec to set these options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT and LUAJIT_FRIENDLY_MODE. luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT and LUAJIT_FRIENDLY_MODE: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames a CMake variables used for setting custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT and LUAJIT_FRIENDLY_MODE: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames a CMake variables used for setting custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: CMAKE_LUA_LIBRARIES, CMAKE_LUA_INCLUDE_DIR, ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames a CMake variables used for setting custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames CMake variables used for setting a custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) After renaming these options can be specified for luarocks. Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames CMake variables used for setting a custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) After renaming these options can be specified for luarocks. Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames CMake variables used for setting a custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) After renaming these options can be specified for luarocks. The patch also sorts variables in alphabetical order. Needed for google/oss-fuzz#14610
Sometimes one needs to build a luzer module using rockspec with a non-system Lua library and headers or set other CMake options before building. The patch adds variables for the rockspec to set the following CMake options via environment variables: ENABLE_LUAJIT, LUAJIT_FRIENDLY_MODE and OSS_FUZZ: luarocks install --tree=lua_modules luzer-scm-1.rockspec \ ENABLE_LUAJIT=ON LUAJIT_FRIENDLY_MODE=ON The patch also renames CMake variables used for setting a custom Lua library and Lua include directory: LUA_LIBRARIES to CMAKE_LUA_LIBRARIES and LUA_INCLUDE_DIR to CMAKE_LUA_INCLUDE_DIR. This is needed because with empty environment variables LUA_LIBRARIES and LUA_INCLUDE_DIR passed to luarocks breaks CMake module for finding Lua package: CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Lua (missing: LUA_LIBRARIES LUA_INCLUDE_DIR) (Required is at least version "5.1") Call Stack (most recent call first): /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.28/Modules/FindLua.cmake:236 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:49 (find_package) After renaming these options can be specified for luarocks. The patch also sorts variables in alphabetical order. Needed for google/oss-fuzz#14610
The patch itnroduces a CMake option ENABLE_LIBFUZZER_STATIC_LINKAGE that enables static linkage wituh libFuzzer. By default linkage is disabled. Needed for google/oss-fuzz#14610
The previous patch is not set LUA_INCLUDE_DIR when custom Lua include directory is used. The patch fixes that. Also, rockspec has missed variables CMAKE_LUA_LIBRARIES and CMAKE_LUA_INCLUDE_DIR. The patch adds these variables. Follows up the commit 2a58b8a ("rockspec: propagate CMake options"). Needed for google/oss-fuzz#14610
The patch itnroduces a CMake option DISABLE_LIBFUZZER_STATIC_LINKAGE that disables static linkage wituh libFuzzer. By default linkage is enabled. Needed for google/oss-fuzz#14610
5aca8b2 to
73f555c
Compare
73f555c to
0e03ce8
Compare
The previous patch is not set LUA_INCLUDE_DIR when custom Lua include directory is used. The patch fixes that. Also, rockspec has missed variables CMAKE_LUA_LIBRARIES and CMAKE_LUA_INCLUDE_DIR. The patch adds these variables. Follows up the commit 2a58b8a ("rockspec: propagate CMake options"). Needed for google/oss-fuzz#14610
d24af8f to
c169cce
Compare
The patch itnroduces a CMake option DISABLE_LIBFUZZER_STATIC_LINKAGE that disables static linkage wituh libFuzzer. By default linkage is enabled. Needed for google/oss-fuzz#14610
ad3c460 to
e4accfb
Compare
sudo python infra/helper.py build_fuzzers lua sudo python infra/helper.py check_build lua utf8_char_test Related to ligurio/lunapark#180 Related to ligurio/luzer#83
e4accfb to
323e75d
Compare
|
@DavidKorczynski ok to merge? |
|
@jonathanmetzman ok to merge? |
|
I haven't followed the luzer PRs closely, but is this a libfuzzer based fuzzing approach? just to confirm it is compatible with the clusterfuzz infra |
Yes, luzer is a libFuzzer-based fuzzing engine. The same tests were already integrated for the Tarantool project, see #14834 and #14656. And the same tests are already in use for LuaJIT testing using ClusterFuzzLite infra. |
Follows up the commit 8361dd0 ("lua: support luzer-based testing (google#14610)")
Follows up the commit 8361dd0 ("lua: support luzer-based testing (google#14610)")
Follows up the commit 8361dd0 ("lua: support luzer-based testing (google#14610)")
Follows up the commit 8361dd0 ("lua: support luzer-based testing (google#14610)")
Related to google#15359 Related to google#14610
Depends on #13929
Depends on ligurio/luzer#74
Depends on ligurio/lunapark#179
Depends on ligurio/luzer#82
Related to ligurio/lunapark#180
Related to ligurio/luzer#83