@@ -85,20 +85,15 @@ func Test_signal_INT()
8585 throw ' Skipped: INT signal not supported'
8686 endif
8787
88- " Skip the test when running with valgrind as signal INT is not received
89- " somehow by Vim when running with valgrind.
90- let cmd = GetVimCommand ()
91- if cmd = ~ ' valgrind'
92- throw ' Skipped: cannot test signal INT with valgrind'
93- endif
94-
9588 let buf = RunVimInTerminal (' ' , {' rows' : 6 })
9689 let pid_vim = term_getjob (buf )- >job_info ().process
9790
9891 " Check that an endless loop in Vim is interrupted by signal INT.
92+ call term_sendkeys (buf , " :call setline(1, 'running')\n " )
9993 call term_sendkeys (buf , " :while 1 | endwhile\n " )
10094 call WaitForAssert ({- > assert_equal (' :while 1 | endwhile' , term_getline (buf , 6 ))})
10195 exe ' silent !kill -s INT ' .. pid_vim
96+ sleep 50 m
10297 call term_sendkeys (buf , " :call setline(1, 'INTERRUPTED')\n " )
10398 call WaitForAssert ({- > assert_equal (' INTERRUPTED' , term_getline (buf , 1 ))})
10499
@@ -112,13 +107,6 @@ func Test_signal_TSTP()
112107 throw ' Skipped: TSTP signal not supported'
113108 endif
114109
115- " Skip the test when running with valgrind as signal TSTP is not received
116- " somehow by Vim when running with valgrind.
117- let cmd = GetVimCommand ()
118- if cmd = ~ ' valgrind'
119- throw ' Skipped: cannot test signal TSTP with valgrind'
120- endif
121-
122110 " If test fails once, it can leave temporary files and trying to rerun
123111 " the test would then fail again if they are not deleted first.
124112 call delete (' .Xsig_TERM.swp' )
@@ -142,9 +130,10 @@ func Test_signal_TSTP()
142130 exe ' silent !kill -s TSTP ' .. pid_vim
143131 call WaitForAssert ({- > assert_true (filereadable (' .Xsig_TERM.swp' ))})
144132
145- " We resume after the suspend
133+ " We resume after the suspend. Sleep a bit for the signal to take effect,
134+ " also when running under valgrind.
146135 exe ' silent !kill -s CONT ' .. pid_vim
147- exe ' silent ! sleep 0.006 '
136+ sleep 100 m
148137
149138 call StopVimInTerminal (buf )
150139
0 commit comments