From 141a498ccaad333e34265fdab828a3d5038d2a64 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 11 Jul 2026 14:21:40 +0200 Subject: [PATCH 1/3] test: unreliable "API nvim_list_chans, nvim_get_chan_info stream=job :terminal channel" FAILED ...vim/build/Xtest_xdg_api/test/functional/api/vim_spec.lua @ 3256: API nvim_list_chans, nvim_get_chan_info stream=job :terminal channel Expected values to be equal. Expected: { argv = { "/home/runner/work/neovim/neovim/build/bin/nvim", "-u", "NONE", "-i", "NONE" }, buf = 2, buffer = 2, exitcode = 1, id = 4, mode = "terminal", pty = "", stream = "job" } Actual: { argv = { "/home/runner/work/neovim/neovim/build/bin/nvim", "-u", "NONE", "-i", "NONE" }, buf = 2, buffer = 2, exitcode = 129, id = 4, mode = "terminal", pty = "", stream = "job", = { __tostring = } } stack traceback: ...vim/build/Xtest_xdg_api/test/functional/api/vim_spec.lua:3300: in function <...vim/build/Xtest_xdg_api/test/functional/api/vim_spec.lua:3256> --- test/functional/api/vim_spec.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 3846cfd3ae..d081495dab 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3297,7 +3297,11 @@ describe('API', function() -- On Windows, even though Nvim TUI handles SIGHUP, it's not possible for the -- parent process to know that, so exit code reflects SIGHUP. expected2.exitcode = (is_os('win') and 129 or 1) - eq(expected2, eval('nvim_get_chan_info(&channel)')) + local chaninfo2 = eval('nvim_get_chan_info(&channel)') + if t.is_asan() and chaninfo2.exitcode == 129 then + expected2.exitcode = 129 -- FIXME: SIGHUP sometimes isn't caught with ASAN. 96d6042689064 + end + eq(expected2, chaninfo2) -- :terminal with args + stopped process (shell-test). command('enew') From f2927bd919107127f51b18098e632d222356083e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 11 Jul 2026 14:27:47 +0200 Subject: [PATCH 2/3] test: unreliable "vim.system (async) supports timeout" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FAILED 2 tests, listed below: FAILED …/lua/system_spec.lua:124: …/lua/system_spec.lua @ 44: vim.system (async) supports timeout …/lua/system_spec.lua:124: …/lua/system_spec.lua:44: process still exists stack traceback: D:/a/neovim/neovim/test/functional/testnvim/exec_lua.lua:124: in function 'system' …/lua/system_spec.lua:124: in function <…/lua/system_spec.lua:118> FAILED …/lua/system_spec.lua:111: …/lua/system_spec.lua @ 22: vim.system (sync) can set environment with clear_env = true and env = nil …/lua/system_spec.lua:111: …/lua/system_spec.lua:22: process still exists stack traceback: D:/a/neovim/neovim/test/functional/testnvim/exec_lua.lua:124: in function 'system' …/lua/system_spec.lua:111: in function <…/lua/system_spec.lua:97> --- test/functional/lua/system_spec.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/test/functional/lua/system_spec.lua b/test/functional/lua/system_spec.lua index 372c5288be..20cec86fd3 100644 --- a/test/functional/lua/system_spec.lua +++ b/test/functional/lua/system_spec.lua @@ -4,7 +4,6 @@ local n = require('test.functional.testnvim')() local clear = n.clear local exec_lua = n.exec_lua local eq = t.eq -local pcall_err = t.pcall_err local function system_sync(cmd, opts) return exec_lua(function() @@ -18,8 +17,13 @@ local function system_sync(cmd, opts) local res = obj:wait() - -- Check the process is no longer running - assert(not vim.api.nvim_get_proc(obj.pid), 'process still exists') + -- Check the process is no longer running. nvim_get_proc() can lag the exit callback (on Windows)? + assert( + vim.wait(1000, function() + return not vim.api.nvim_get_proc(obj.pid) + end), + 'process still exists' + ) return res end) @@ -40,8 +44,13 @@ local function system_async(cmd, opts) assert(ok, 'process did not exit') - -- Check the process is no longer running - assert(not vim.api.nvim_get_proc(obj.pid), 'process still exists') + -- Check the process is no longer running. nvim_get_proc() can lag the exit callback (on Windows)? + assert( + vim.wait(1000, function() + return not vim.api.nvim_get_proc(obj.pid) + end), + 'process still exists' + ) return res end) From d1b7a39fc36cdc76eab12a4ac80c9ee1c2ad37f7 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 11 Jul 2026 14:45:10 +0200 Subject: [PATCH 3/3] test: unreliable "TUI split sequences within 'ttimeoutlen'" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FAILED ...Xtest_xdg_terminal/test/functional/terminal/tui_spec.lua @ 1200: TUI split sequences work within 'ttimeoutlen' time .../runner/work/neovim/neovim/test/functional/ui/screen.lua:774: Row 1 did not match. Expected: |*^ | |{100:~ }| |{100:~ }| |{100:~ }| |*{3:[No Name] }| |{5:-- INSERT --} | |{5:-- TERMINAL --} | Actual: |*�^ | |{100:~ }| |{100:~ }| |{100:~ }| |*{3:[No Name] [+] }| |{5:-- INSERT --} | |{5:-- TERMINAL --} | --- test/functional/terminal/tui_spec.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 63d600c1f8..34e7b12bc6 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -1199,7 +1199,9 @@ describe('TUI', function() it("split sequences work within 'ttimeoutlen' time", function() poke_both_eventloop() -- Make sure startup requests have finished. - child_session:request('nvim_set_option_value', 'ttimeoutlen', 250, {}) + -- The split sequences below are always completed, so this timeout never actually fires; it only + -- needs to exceed the inter-byte gap, which balloons on slow CI. + child_session:request('nvim_set_option_value', 'ttimeoutlen', n.load_adjust(1000), {}) feed_data('i') screen:expect([[ ^ | @@ -1236,7 +1238,11 @@ describe('TUI', function() {5:-- ^X mode (^]^D^E^F^I^K^L^N^O^P^Rs^U^V^Y)} | {5:-- TERMINAL --} | ]]) - -- is sent after 'ttimeoutlen' exceeds. + + -- is sent after 'ttimeoutlen' exceeds. Use a small value so the sleep below reliably exceeds it. + child_session:request('nvim_set_option_value', 'ttimeoutlen', 250, {}) + poke_both_eventloop() + feed_data('\027') screen:expect_unchanged(false, 25) vim.uv.sleep(225)