push
github
lua: fix flaky custom allocator test This patch fixes the flaky test verifying `used()` and `unused()` functions of the `internal.alloc` module in the `alloc_test` suite. The test compares the value of the unused memory with the one calculated by the builtin Lua functions. This test has been failing on a few workflows. The executed and the real values has been close to each other though not equal. This false negative result likely happens because of the details of the `collectgarbage()` implementation. This patch fixes it by adding arbitrary margin equal to 16Kb of memory when comparing the value calculated using the LuaJIT call with the one provided by the module function. NO_CHANGELOG=flaky tests NO_DOC=flaky tests (cherry picked from commit 7731d13d0)
69640 of 123486 branches covered (56.4%)
102599 of 117453 relevant lines covered (87.35%)
3038456.76 hits per line