mirror of
https://github.com/vim/vim.git
synced 2025-08-22 19:27:53 -04:00
patch 8.2.5158: TSTP and INT signal tests are not run with valgrind
Problem: TSTP and INT signal tests are not run with valgrind. Solution: Sleep a bit longer. (closes #10614)
This commit is contained in:
parent
4e0fc89566
commit
61e3784819
@ -85,20 +85,15 @@ func Test_signal_INT()
|
|||||||
throw 'Skipped: INT signal not supported'
|
throw 'Skipped: INT signal not supported'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Skip the test when running with valgrind as signal INT is not received
|
|
||||||
" somehow by Vim when running with valgrind.
|
|
||||||
let cmd = GetVimCommand()
|
|
||||||
if cmd =~ 'valgrind'
|
|
||||||
throw 'Skipped: cannot test signal INT with valgrind'
|
|
||||||
endif
|
|
||||||
|
|
||||||
let buf = RunVimInTerminal('', {'rows': 6})
|
let buf = RunVimInTerminal('', {'rows': 6})
|
||||||
let pid_vim = term_getjob(buf)->job_info().process
|
let pid_vim = term_getjob(buf)->job_info().process
|
||||||
|
|
||||||
" Check that an endless loop in Vim is interrupted by signal INT.
|
" Check that an endless loop in Vim is interrupted by signal INT.
|
||||||
|
call term_sendkeys(buf, ":call setline(1, 'running')\n")
|
||||||
call term_sendkeys(buf, ":while 1 | endwhile\n")
|
call term_sendkeys(buf, ":while 1 | endwhile\n")
|
||||||
call WaitForAssert({-> assert_equal(':while 1 | endwhile', term_getline(buf, 6))})
|
call WaitForAssert({-> assert_equal(':while 1 | endwhile', term_getline(buf, 6))})
|
||||||
exe 'silent !kill -s INT ' .. pid_vim
|
exe 'silent !kill -s INT ' .. pid_vim
|
||||||
|
sleep 50m
|
||||||
call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
|
call term_sendkeys(buf, ":call setline(1, 'INTERRUPTED')\n")
|
||||||
call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
|
call WaitForAssert({-> assert_equal('INTERRUPTED', term_getline(buf, 1))})
|
||||||
|
|
||||||
@ -112,13 +107,6 @@ func Test_signal_TSTP()
|
|||||||
throw 'Skipped: TSTP signal not supported'
|
throw 'Skipped: TSTP signal not supported'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Skip the test when running with valgrind as signal TSTP is not received
|
|
||||||
" somehow by Vim when running with valgrind.
|
|
||||||
let cmd = GetVimCommand()
|
|
||||||
if cmd =~ 'valgrind'
|
|
||||||
throw 'Skipped: cannot test signal TSTP with valgrind'
|
|
||||||
endif
|
|
||||||
|
|
||||||
" If test fails once, it can leave temporary files and trying to rerun
|
" If test fails once, it can leave temporary files and trying to rerun
|
||||||
" the test would then fail again if they are not deleted first.
|
" the test would then fail again if they are not deleted first.
|
||||||
call delete('.Xsig_TERM.swp')
|
call delete('.Xsig_TERM.swp')
|
||||||
@ -142,9 +130,10 @@ func Test_signal_TSTP()
|
|||||||
exe 'silent !kill -s TSTP ' .. pid_vim
|
exe 'silent !kill -s TSTP ' .. pid_vim
|
||||||
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
|
call WaitForAssert({-> assert_true(filereadable('.Xsig_TERM.swp'))})
|
||||||
|
|
||||||
" We resume after the suspend
|
" We resume after the suspend. Sleep a bit for the signal to take effect,
|
||||||
|
" also when running under valgrind.
|
||||||
exe 'silent !kill -s CONT ' .. pid_vim
|
exe 'silent !kill -s CONT ' .. pid_vim
|
||||||
exe 'silent !sleep 0.006'
|
sleep 100m
|
||||||
|
|
||||||
call StopVimInTerminal(buf)
|
call StopVimInTerminal(buf)
|
||||||
|
|
||||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
5158,
|
||||||
/**/
|
/**/
|
||||||
5157,
|
5157,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user