commit 5c4d9261a421e6752c27e49ea79026995bf9934f
parent 20a7e744441983906b3ff1c8562e05e32af50c32
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 16 Jan 2026 12:40:51 +0800
vim-patch:partial:9.1.1110: Vim tests are slow and flaky
Problem: Vim tests are slow and flaky at the same time due to reliance
on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
(Yee Cheng Chin)
closes: vim/vim#16615
https://github.com/vim/vim/commit/e70587dbdbb1aba2c3f92490b8f870361d4a4177
Remaining test_crash.vim changes only.
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat:
1 file changed, 15 insertions(+), 30 deletions(-)
diff --git a/test/old/testdir/test_crash.vim b/test/old/testdir/test_crash.vim
@@ -191,64 +191,49 @@ func Test_crash1_3()
let buf = RunVimInTerminal('sh', #{cmd: 'sh'})
let file = 'crash/poc_ex_substitute'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/poc_uaf_exec_instructions'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/poc_uaf_check_argument_types'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/double_free'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 50)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/dialog_changed_uaf'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/nullpointer'
- let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'\<cr>"
+ let cmn_args = "%s -u NONE -i NONE -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 50)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/heap_overflow3'
let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/heap_overflow_glob2regpat'
let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 50)
+ call s:RunCommandAndWait(buf, args)
let file = 'crash/nullptr_regexp_nfa'
let cmn_args = "%s -u NONE -i NONE -n -X -m -n -e -s -S %s -c ':qa!'"
let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 50)
-
- let file = 'crash/ex_redraw_crash'
- let cmn_args = "%s -u NONE -i NONE -n -m -X -Z -e -s -S %s -c ':qa!'"
- let args = printf(cmn_args, vim, file)
- call term_sendkeys(buf, args)
- call TermWait(buf, 150)
+ call s:RunCommandAndWait(buf, args)
" clean up
exe buf .. "bw!"