push
github
lua: fix flaky custom allocator test again 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 used memory with the one calculated by the builtin Lua functions. 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. The same problem has been fixed in terms of the commit 7731d13d0af6a1 ("lua: fix flaky custom allocator test"). The previous commit fixed corresponding checks on the `unused()` value. This one fixes `used()` checks that seem to be not precise in coverage workflows. NO_CHANGELOG=flaky tests NO_DOC=flaky tests (cherry picked from commit dd5039a1d)
69685 of 123524 branches covered (56.41%)
102630 of 117454 relevant lines covered (87.38%)
3271784.23 hits per line