diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-07-18 22:15:54 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-02 12:00:00 -0400 |
commit | 1e6bf6f17a79ccc3a1fc752088f7e3c2024e78cf (patch) | |
tree | 25ea8e186660b53eb1683f8038f1647519823ba5 | |
parent | c207886bdf9c4545d48837c968091b1384569562 (diff) | |
download | rneovim-1e6bf6f17a79ccc3a1fc752088f7e3c2024e78cf.tar.gz rneovim-1e6bf6f17a79ccc3a1fc752088f7e3c2024e78cf.tar.bz2 rneovim-1e6bf6f17a79ccc3a1fc752088f7e3c2024e78cf.zip |
vim-patch:8.2.0072: memory test still fails on Cirrus CI
Problem: Memory test still fails on Cirrus CI.
Solution: Allow for a tiny bit more tolerance in the upper limit.
https://github.com/vim/vim/commit/bb062c1588c324a1ce4cf01fd5e0780e83aaabe4
Check memory usage after Neovim sourced the Vimscript files.
https://github.com/neovim/neovim/pull/12679
N/A patches for version.c:
vim-patch:8.2.0062: memory test is flaky on FreeBSD
Problem: Memory test is flaky on FreeBSD.
Solution: Add a short sleep before getting the first size.
https://github.com/vim/vim/commit/e7538ae997b3983d0c91a886a74ebacedd752164
vim-patch:8.2.0071: memory test often fails on Cirrus CI
Problem: Memory test often fails on Cirrus CI.
Solution: Allow for more tolerance in the upper limit. Remove sleep.
https://github.com/vim/vim/commit/1832d12aea30f1533f3c461d9e1530d10f66b162
-rw-r--r-- | test/functional/legacy/memory_usage_spec.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/legacy/memory_usage_spec.lua b/test/functional/legacy/memory_usage_spec.lua index 28ca749749..251e6a5ea4 100644 --- a/test/functional/legacy/memory_usage_spec.lua +++ b/test/functional/legacy/memory_usage_spec.lua @@ -7,6 +7,9 @@ local iswin = helpers.iswin local retry = helpers.retry local ok = helpers.ok local source = helpers.source +local wait = helpers.wait +local uname = helpers.uname +local load_adjust = helpers.load_adjust local monitor_memory_usage = { memory_usage = function(self) @@ -99,6 +102,7 @@ describe('memory usage', function() call s:f(0) endfor ]]) + wait() local after = monitor_memory_usage(pid) -- Estimate the limit of max usage as 2x initial usage. -- The lower limit can fluctuate a bit, use 97%. @@ -143,16 +147,20 @@ describe('memory usage', function() call s:f() endfor ]]) + wait() local after = monitor_memory_usage(pid) for _ = 1, 3 do feed_command('so '..fname) + wait() end local last = monitor_memory_usage(pid) -- The usage may be a bit less than the last value, use 80%. -- Allow for 20% tolerance at the upper limit. That's very permissive, but - -- otherwise the test fails sometimes. + -- otherwise the test fails sometimes. On Sourcehut CI with FreeBSD we need to + -- be even more permissive. + local upper_multiplier = uname() == 'freebsd' and 15 or 12 local lower = before.last * 8 / 10 - local upper = (after.max + (after.last - before.last)) * 12 / 10 + local upper = load_adjust((after.max + (after.last - before.last)) * upper_multiplier / 10) check_result({before=before, after=after, last=last}, pcall(ok, lower < last.last)) check_result({before=before, after=after, last=last}, |