neovim/test/unit
bfredl 5e569a4703 refactor(fs): now it is time to get rid of fs_loop and fs_loop_mutex
Here's the headline: when run in sync mode (last argument cb=NULL),
these functions don't actually use the uv_loop_t.

An earlier version of this patch instead replaced fs_loop with
using main_loop.uv on the main thread and luv_loop() on luv worker
threads. However this made the code more complicated for no reason.

Also arbitrarily, half of these functions would attempt to handle
UV_ENOMEM by try_to_free_memory(). This would mostly happen
on windows because it needs to allocate a converted WCHAR buffer.
This should be a quite rare situation. Your system is pretty
much hosed already if you cannot allocate like 50 WCHAR:s.
Therefore, take the liberty of simply removing this fallback.

In addition, we tried to "recover" from ENOMEM in read()/readv()
this way which doesn't make any sense. The read buffer(s) are already
allocated at this point.

This would also be an issue when using these functions on a worker
thread, as try_to_free_memory() is not thread-safe. Currently
os_file_is_readable() and os_is_dir() is used by worker threads
(as part of nvim__get_runtime(), to implement require from 'rtp' in
threads).

In the end, these changes makes _all_ os/fs.c functions thread-safe,
and we thus don't need to document and maintain a thread-safe subset.
2023-04-25 21:30:19 +02:00
..
api refactor(api): break out Vim script functions to its own file 2021-10-29 16:59:53 +02:00
charset vim-patch:9.0.1380: CTRL-X on 2**64 subtracts two (#22530) 2023-03-05 09:18:42 +08:00
eval vim-patch:8.2.1047: Vim9: script cannot use line continuation like :def function 2023-04-14 09:23:40 +08:00
fixtures refactor: remove use of reserved c++ keywords 2023-04-06 22:39:50 +02:00
os test(unit): add test for os_mkdir_recurse "created" 2023-04-16 15:04:41 +08:00
viml feat: add support for global statusline 2022-03-18 00:21:41 +06:00
buffer_spec.lua feat(ui): add 'statuscolumn' option 2023-01-09 17:12:06 +00:00
fileio_spec.lua unittests: Check core dumps in after_each, like in functests 2017-03-11 23:23:49 +03:00
formatc.lua refactor(unit): add type annotations 2023-04-14 12:41:57 +01:00
garray_spec.lua chore: fix typos (#16816) 2022-01-04 11:07:40 -07:00
helpers.lua refactor(fs): now it is time to get rid of fs_loop and fs_loop_mutex 2023-04-25 21:30:19 +02:00
indent_spec.lua vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840) 2022-08-19 19:20:39 +08:00
keycodes_spec.lua refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535) 2022-05-12 20:19:29 +08:00
marktree_spec.lua refactor(extmarks): use a more efficient representation 2022-01-15 22:08:12 +01:00
mbyte_spec.lua build/doc/CI: remove/update quickbuild references #11258 2019-10-19 18:04:08 -07:00
memory_spec.lua unittests: Check core dumps in after_each, like in functests 2017-03-11 23:23:49 +03:00
message_spec.lua refactor: remove char_u (#22829) 2023-04-02 16:11:42 +08:00
multiqueue_spec.lua unittests: Use more adequate names for some functions 2017-03-12 02:54:23 +03:00
optionstr_spec.lua vim-patch:8.1.2045: the option.c file is too big (#19854) 2022-08-20 17:26:44 +08:00
path_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
preload.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
preprocess.lua refactor(unit): add type annotations 2023-04-14 12:41:57 +01:00
profile_spec.lua unittests: Do not import libnvim or headers in main process 2017-03-11 23:23:49 +03:00
rbuffer_spec.lua unittests: Use more adequate names for some functions 2017-03-12 02:54:23 +03:00
search_spec.lua vim-patch:9.0.1092: search error message doesn't show used pattern (#21518) 2022-12-24 07:55:03 +08:00
set.lua refactor(unit): add type annotations 2023-04-14 12:41:57 +01:00
strings_spec.lua refactor: move reverse_text to strings.c as it's a string operation 2022-05-20 16:11:54 +02:00
tempfile_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00
testtest_spec.lua unittests: Collect traces 2017-04-01 12:25:10 +03:00
tui_spec.lua refactor(tests): run unittests using main nvim binary in interpreter mode 2023-01-31 19:28:26 +01:00
undo_spec.lua test: replace lfs with luv and vim.fs 2023-04-04 21:59:06 +02:00