From 40a42affa5c3ecdb1d8133850ebf4e043cd2f14b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 25 Mar 2026 13:04:15 +0800 Subject: [PATCH] test: work around flaky swapfile test with ASAN (#38482) FAILED test/functional/ex_cmds/swapfile_preserve_recover_spec.lua @ 118: preserve and (R)ecover with custom 'directory' killing TUI process without :preserve #22096 test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:132: Failed to match any screen lines. Expected (anywhere): "%[Process exited 1%]" Actual: |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimDarkGrey2:^sometext }| |[Process exited 129]{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4: }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimLightGrey4:~ }| |{UNEXPECTED background = Screen.colors.NvimLightGrey4, foreground = Screen.colors.NvimDarkGrey2:Xtest_recover_file1 [+] 1,8 All}| |{UNEXPECTED background = Screen.colors.NvimLightGrey2, foreground = Screen.colors.NvimDarkGrey2: }| | | --- test/functional/ex_cmds/swapfile_preserve_recover_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua index 96f43bb037..f321efdd7b 100644 --- a/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua +++ b/test/functional/ex_cmds/swapfile_preserve_recover_spec.lua @@ -129,7 +129,9 @@ describe("preserve and (R)ecover with custom 'directory'", function() set_session(nvim0) -- n.exec_lua([[vim.uv.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) command('call chanclose(&channel)') -- Kill the child process. - screen0:expect({ any = pesc('[Process exited 1]') }) -- Wait for the child process to stop. + -- Wait for the child process to stop. + -- FIXME: with ASAN the signal sometimes isn't caught. + screen0:expect({ any = t.is_asan() and '%[Process exited %d+%]' or '%[Process exited 1%]' }) neq(nil, uv.fs_stat(swappath1)) test_recover(swappath1) end)